Issue :
How to change the default port for SSH?
Solution :
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 :
#Port 22
to
Port x
Replace ‘x’ with the required port number.
Restart sshd :
/etc/init.d/sshd restart