How to change the default port for SSH?
Open the port (which you want to use for SSH) in the server firewall and restart the firewall to apply the change.
Then, open the configuration file /etc/ssh/sshd_config using your favorite editor and change :
Replace ‘x’ with the required port number.
Restart sshd :