SSH over WAN
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Other forums
- :
- Tech Help - Software/Hardware etc
- :
- SSH over WAN
SSH over WAN
03-09-2015 5:59 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I am relatively new to Linux and have been messing around for some time with a RaspberryPi and an old Laptop on Mint.
I would like to be able to SSH into my pi from the WAN when I am out and about but I have concerns about opening security vulnerabilities. I have done this once by forwarding a port on my router to the Pi on the LAN (which I have now closed) and it all worked fine 🙂 I have read that the most secure way of doing this is with either a VPN or a 'Tunnel', both of which seem fairly complex to set up to me (as I don't entirely understand all the steps of the process but get what the end result is).
So my question really is: How secure is SSH without a VPN or Tunnel? Without either of the former what are the potential consequences of forwarding an open a port on the router to my Pi (port 22)? There is no data or anything that I am worried about being compromised on the Pi.
Many thanks in advance for any advice/help
Re: SSH over WAN
03-09-2015 6:44 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

Re: SSH over WAN
03-09-2015 7:05 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
However, having an open port, even if that port is not the default as suggested will have the effect of inviting unwanted callers. Ideally if you know the IP addresses of the locations you are wanting to access your Pi from then you can always restrict access by setting this rule in your firewall. Also ensure you have a proper password made of at least 10 characters, numbers and symbols.
On my firewall I have IP restricted access for HTTPS and SSH and my logs show me no one (so far) can get passed the IP restriction. However if I remove the IP restriction within hours there are all manner of ‘bad people’ knocking on the ports. If you do decide to do this then I'd move the Pi into a DMZ, so if the Pi is compromised there's no other hardware available to them outside the Pi.
Re: SSH over WAN
03-09-2015 10:25 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I have SSH forwarded from a non-standard port on the router to the default port on the sever (also a raspberry pi), and (so far) don't get any unwanted traffic.
As a secondary security measure, tools like Fail2Ban or DenyHosts can monitor the logs and block IPs with too many failures.
Re: SSH over WAN
03-09-2015 10:32 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
Re: SSH over WAN
03-09-2015 10:53 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: SSH over WAN
03-09-2015 10:56 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If it helped click the thumb
If it fixed it click 'This fixed my problem'
Re: SSH over WAN
03-09-2015 12:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
My Pi works on a (LAN only) ssh passphrase.
If your router port forwards port 22 to your Pi then it's game over.
You could at least choose a high numbered port, to make life a bit harder.
"In The Beginning Was The Word, And The Word Was Aardvark."
Re: SSH over WAN
03-09-2015 1:11 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
port 22 is forwarded on the router to the pi.
when i connect to it externally is asked for user/password.
in what way would that be "game over"?
changing the port to a higher number doesn't make it any more or less secure IMO.

Re: SSH over WAN
03-09-2015 1:22 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: SSH over WAN
03-09-2015 3:54 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I think the standard port will get probed far more than a high numbered port.

Re: SSH over WAN
03-09-2015 4:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

Re: SSH over WAN
03-09-2015 4:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
your house is still there and is still visible to those wanting find it.
Re: SSH over WAN
03-09-2015 4:22 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
How often does port 22 get probed? Often. Many times a day probably.
How often does a full port scan get done to you? Practically never.
Re: SSH over WAN
03-09-2015 4:26 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: dvorak same was as you do it on any platform... but here's a link https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md
that's all very well, but the device i am connecting from is a windows 7 system, and that document only refers to connecting from linux/unix systems.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page