How to change SSH port on linux

1. Login SSH root access

2. Edit file /etc/ssh/sshd_config and change the following line

#port 22

with

port {your_desire_port_number}

Save the updated /etc/ssh/sshd_config file.

3. Restart SSH Server by run this command

systemctl restart sshd

Was this article helpful?

Related Articles