-4

This is a naive question, but I don't know the answer. I have forwarded port 22 on my router to point to my NAS. I also have a Hummingboard server which I'd also like to access through SSH. How can I handle this situation? Thanks!

Dani

2
  • With SSH this is impossible. You will need to choose another port on the outside of your NAT.
    – EEAA
    Dec 12, 2014 at 14:28
  • 1
    Unrelated note, but putting anything internet-accessible on port 22 will get you hammered by script kiddies trying to brute-force the login. Hopefully you have some additional security configured.
    – jlehtinen
    Dec 12, 2014 at 15:05

2 Answers 2

1

You could let one SSH server listen on a non-standard port (e.g. 51234) and then SSH to it by passing the "-p 51234" option to your SSH client.

Man page for linux SSH client: http://www.freebsd.org/cgi/man.cgi?query=ssh

1
  • Just to make sure I understand. I set up the public port on 22 while putting the servers on non standard ports, such as 51234 for the Hummingboard and 51233 for the NAS? Currently, I have my NAS set up to listen to port 22 and the Hummingboard to port 51234. However, when I ssh passing the -p 51234 argument it still directs me to the NAS. Should I set up the NAS to listen to another port other than 22? Dec 13, 2014 at 10:11
0

Configure the NAS and Hummingboard's SSH daemons to listen on different ports. For example, you could use port 22 for your NAS box and 2222 for the Hummingboard.

1
  • Well, OP is forwarding the port on the router to the device. So the SSH deamons do not need to listen on different ports. The router just would need to be configured to forward a different port to the 2nd device's port 22. i.e. router:22 -> NAS:22, router:2222 -> Hummingboard:22
    – jlehtinen
    Dec 12, 2014 at 15:02

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