CentOS/RHEL: How To Modfiy The Openssh Port Number

How Do I change the openssh port number from 22 to 2000 on my centos or rhel system? you will see that how to change the port of openssh under centos or rhel operating system in this post.

​You need to edit the configuration file located in “/etc/ssh/sshd_config” and using “vim” command to edit “/etc/ssh/sshd_config” file and adding the following line:

port 2000

save and close above configuration file, then resart sshd service, issue the following command.

service sshd restart

 

You might also like:

Sidebar



back to top