Ubuntu - SSH - Change the Port

Edit the /etc/ssh/sshd_config file, and change the Port:

/etc/ssh/sshd_config
Port <change to another port other than 22>

Restart sshd

sudo systemctl restart ssh
 
or
 
sudo /etc/init.d/ssh restart

NOTE: Remember to update firewall rules accordingly and ensure the new port is not used by another service.