Knowledgebase - How to alter SSH Port in Linux

Our Client Portal

Portal Home > Knowledgebase > Dedicated Servers > How to alter SSH Port in Linux

How to alter SSH Port in Linux

To change SSH port on a Linux based device

1) Login as root or a user on the sudouser list
2) Locate and open the file sshd_config (usually in nano /etc/ssh/sshd_config) with nano or vi
3) Search for the line that starts "#Port 22"
4) Remove the hashtag (comment marker) and change the number to what ever port you wish e.g. 3022
5) Save the changes and exit the file editor
6) Restart the SSH service by issuing "service sshd restart"

You have successfully changed your SSH port for you device!

Add to Favourites Add to Favourites

Was this answer helpful?

Print this Article Print this Article

Also Read

Recent News
Knowledgebase Articles
It is now possible to temporarily suspend the monitoring of Managed Dedicated Se...
Please Note: In order to reset your Centos password you will need KVM access to ...
As of Java version 7 onwards, the Java development team continue to make securit...