How to change the SSH port on linux server

To change the SSH port on Linux server, you need to log into your server as the root user. You can find the SSH configuration file at /etc/ssh/sshd_config

To change specific parameters within sshd_config, you need to uncomment the line by removing the number-sign (#) and changing the value for the line. For example, the default SSH port appears in a line like this:

#Port 22

To change the SSH port to 759, you will need to make the line appear like this:

Port 759

After you are finished configuring SSH, you will need to restart the SSH daemon. You can do so by issuing the following command:

# /etc/init.d/sshd restart

After you restart SSH, you will need to log out of your server and log in again using the proper user, IP address, and port number you specified in sshd_config.



Comments

Popular posts from this blog

SVN: File remains in conflict

HowTo: Enable extended logging for exim

12 tweakings for WHM/cPanel to speed up WordPress