Although it is a security risks, it is possible to make OpenSSH listens on multiple port.
To do that, you need to edit /etc/ssh/sshd_config file. and enable the “GatewayPorts” option.
Look for the line that contain “Port 22″, and uncomment it if necessary, and add additional Port line to enable OpenSSH to listen to other ports. Like this:
The example will enable OpenSSH to listen to port 22,80,1025 simultaneously. Don’t forget to restart SSH service to enable the change by running :
sudo /etc/inet.d/sshd restart
Warning: Running SSH on multiple port may cause security risk, you have been warned!
Keep updated with the latest posts, be a part of over 1,000 subscribers! : Subscribe to your email
You might also want to read...
- How to Enable Outgoing Keyserver port with iptables firewall
- How to secure your SSH server
- Iptables rule to safeguard SSH server from crackers
- How to limit MySQL port access to specific network
- Solving SSH “channel 3: open failed: administratively prohibited” error when tunnelling
- Howto create a simple Debian/Ubuntu Repository
- Howto solve ssh_exchange_identification: Connection closed by remote host error