Is it possible to set ssh listen on two ports? I want to have the standard port listening as usual as this is used by rsync etc, but also to have a secondary port listening for other connections. This is because I have two servers sitting behind a portforwarding router and I want to set a second port to forward to the backup server so I can ssh both remotely. At the moment I ssh the main one... and then ssh the internal ip from that shell!!...which is a bit cumbersome.
SSH can listen on multiple ports. Just add additional ports in sshd_config like this: Port 22 Port 8888 restart sshd daemon and you are good to go.
hi, this is great, but what then shall be my command in terminal? does ssh username@hostname is enough? I need to access the server listening to 2 ports. I use ssh -L 80:localhost:80 username@hostname ssh -L 13013:localhost:13013 username@hostname on a separate terminal thanks!
will sshd: in /etc/hosts.allow work for both ports or can I setup different rules for the second port?