Jumat, 14 November 2014

Changing SSH Port

Default port of SSH is 22, but for certain reasons such as safety then we can change that port.

 Open terminal as root, type :

nano /etc/ssh/sshd_config

look for the following line:


# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
…...................................

then we change the port 22 corresponding port we want.


# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 23
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
…...................................

or can we add multiple ports 

# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22
Port 23
Port 1000
Port 1001
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
 ...........................

save and exit by pressing Ctrl+X.

Try port connection.

run putty.exe on the client PC

in the Ports tab, enter the port that we have a fox earlier.






 

2 komentar:

Related Posts Plugin for WordPress, Blogger...