By default, all newly set up servers listen and accept SSH login on port 22 which is known universally. To make it a little harder for hackers to break into your user account, one of the first steps you want to take is to change the default SSH port to a different on that’s randomly chosen by you.
To do this, simply modify the sshd configuration file by:
nano /etc/sshd/sshd_config
For novice SSH users, nano is more intuitive than vi. After loading the file in the editor, find and change this line:
Port 22
To
Port 8433
Ctrl + o and ctrl + x should save the change and get you out of the editor.
The port number can be anything between 1024 and 65535, inclusive. You can make it instantly in effect by reloading the new configurations:
/etc/init.d/ssh reload
Now the server will only accept SSH accesses on the port 8433. After modifying this, make sure you also change the remote port setting in your local SSH client or it will be rejected by the hosting server.

May 30th, 2009 at 10:01 pm
[...] Change the default SSH port 22 to a random one of your choice May [...]
May 31st, 2009 at 12:16 am
[...] Customize the default SSH listening port of 22 to a custom one. [...]