Run SSH in multiple ports
SSH by default runs on one port only, which by default is 22.There are times however that we might want to run SSH in more than just one port.
Which port SSH daemon is run is set by the Port option in the /etc/sshd_config configuration file. If it is not set, SSH daemon will run on it’s default port.
To make it run on both port 22 and 2222, make sure the 2 lines exist in the configuration file;
Port 22 Port 2222
To have the changes take effect, the SSH daemon need to reload the edited configuration file with the following command;
# /etc/init.d/ssh reload
In some Linux distribution, the command is as the following;
# /etc/init.d/sshd reload
Posted on 27.08.2008 and categorized under linux