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:
For novice SSH users, nano is more intuitive than vi. After loading the file in the editor, find and change this line:
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:
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.