User Tools

Site Tools


ubuntu:ssh:change_the_port

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.

ubuntu/ssh/change_the_port.txt · Last modified: 2025/05/21 09:41 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki