I am trying to set up several server to which I can SSH from outside networks and the following things come to mind.

If I use a solution similar to this previous question then it means that I can only forward 1 ssh port 22.

Possible options:

  1. Should I just give all of the servers different non-standard ssh ports? That seems to be a good idea for security and being able to keep the same solution of port forwarding.

    1. The other option is to setup a VPN to my home network and then keep all SSH access within my local network. Is this last option more secure, the same, or less secure than option 1?

Finally, is there any other way you would implement this? are there any workarounds to check what my home server IP is from the outside network given the fact that I don't have a Static IP.

2 Answers 2


If you have the option to use a VPN, I would take that route. While forwarding the individual SSH sessions would work, a VPN gives you a lot more flexibility. You only need to worry about VPN access and then you have the ability to use any port or service per machine.

  • How would you go about not having a static IP? Again, this is not a corporate setup and having the occasional problems would be ok, however I do want to optimize it or prevent this as much as possible.
    – BluePython
    Mar 7, 2016 at 19:09
  • @BluePython google free Dynamic DNS providers, that would solve the issue of changing IP addresses.
    – Keltari
    Mar 7, 2016 at 23:20

While setting up a VPN for this strikes me subjectively as "more correct", running SSH on different nonstandard ports is by far the easiest and simplest.

I would personally go for this, as all of my servers run on nonstandard ports anyway to avoid botnets cluttering up my logfiles with failed login attempts. Of course this means that I am 110% sure that SSH will be the only service I'll wver need to access feom the outside.

While a properly configured VPN is very reliable, it does add an aditional point of complexity with the potential for failure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.