It is probably best to change the default SSH port to add some protection to your server. You need to change the SSH server’s configuration file by running the following command.
It opens up the config file in NANO editor.
Look for the line that starts with Port 22.Comment out this line like this:
and add a new line with new port number of your own liking. You can choose a number between 1025 and 65536.
Press Ctrl + x to save the file.
Restart the SSH server by executing this command
Service ssh restart