how to change Linux server SSH Port

  BSD, CentOS, Debian, Ubuntu

when you use linux server many time you need to change server ssh port, today i show you how to change Linux server SSH Port, please follow the steps how to change Linux server SSH Port

How to change Linux server SSH port

1. connect your server SSH root
2. now run the flowing command:

vi /etc/ssh/sshd_config

3. now change the flowing line on your ssh:

# Port 22

removed the port 22 and include your new port number

4. now save and restart SSHD flowing command line:

service sshd restart

now completely change your SSH port & next time login uses the new port on SSH.

LEAVE A COMMENT