UnixServerAdmin

Server Administration & Management

How to make SSH listens on multiple port

Although it is a security risks, it is possible to make OpenSSH listens on multiple port. To do that, you need to edit file and enable the “GatewayPorts” option.

# vim /etc/ssh/sshd_config
——————————————
AllowTcpForwarding no
GatewayPorts yes
X11Forwarding no
#X11DisplayOffset 10
——————————————

1. 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:
———————–
Port 22
Port 80
Port 1025
———————–

2. 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:

# /etc/init.d/sshd restart

Warning: Running SSH on multiple port may cause security risk, you have been warned!

Advertisements

November 3, 2012 - Posted by | SSH | ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: