Modify SSH Port, Use one other than 22
Login to your Server or VPS as root and follow these steps to change the ssh port.
It is always a good idea to back up important server files before making any changes to them. So copy the file once you have logged into the server.
$ cp /etc/ssh/sshd_config /etc/ssh/sshd_config.back
Next, open the SSH config file with the vi editor.
$ vi /etc/ssh/sshd_config
Search for the line below in the file.
Uncomment the line, if it is commented with a pound symbol and change the port value to the desired one. For example, use 9922. And make sure that you are not using the port number for any other services in the server.
The next step is to save and exit the file.
If you are running a firewall (csf/apf), please make sure that the port is open in the firewall configuration. After updating the firewall configuration with the port number, restart the firewall and then the SSH service.
$ /etc/init.d/sshd restart
Remember that you have to access SSH by specifying the new port like below.
$ ssh firstname.lastname@example.org -p 9922
How to Enable or Disable Built-in Administrator Account in Windows How to create a Self-Signed SSL Certificate