Powered By Blogger

Tuesday 22 January 2013

change the SSH port

How to change the SSH port of a Linux Hosting Server ?

Step 1 : Login to your server as Root
Step 2 : Look for the sshd_config file (it can be found in /etc/ssh directory) and edit itCloud Hosting
vim /etc/ssh/sshd_config
Step 3 : Search for a line that has :
Port 22
Step 4 : Amend the port number with something of your preference.
Note : You must ensure that the new port number is free and isn’t used by any other service.
Step 5 : Once you are sure about the changes, make sure that you Save the file
Step 6 : You may then restart sshd using the following command :
/etc/init.d/sshd restart
Step 7 : Make changes to the firewall with blocking Port 22 and allowing the new Port number used by SSH.

No comments:

Post a Comment