You can change the port that your SSH server runs other than the default 22 by specifying the desired port number in your SSH server configuration file.

Set the Port option in /etc/ssh/sshd_config to your desired port as in the following example;

Port 22

You can use any number between 1 to 65535 as long as it’s not used by other programs.

Be sure to reboot your SSH server afterwards.