How To Change The SSH Port On Your Linux Server
Posted by vipin h, Last modified by
Undefined index: editedstaff (./__swift/cache/99a2018850e43fc96b722079625d25a8.php:44)
on 08 June 2018 04:47:53 PM
The Secure Shell (SSH) Protocol by default uses port 22. It is better to setup a custom SSH port on your VPS/Dedicated servers because, this will stop many automated attacks towards the default SSH port 22.|
1. Connect to your server via SSH (more info).
Steps To Change The SSH Port For Your Linux Server
2. Run the following command:
3. Locate the following line:
# Port 22
5. Remove # and change 22 to your desired port number.
6. Restart the sshd service by running the following command:
7. Verify SSH is listening on the new port by connecting to it. Please check the egample given below:
ssh email@example.com -p 50873
50873 is the custom SSH port here. So, replace it with the port you have setup.