Tag Archives: ssh port

Centos: How to change SSH Port

ssh nano
In order to secure your server, ROOT access. You should consider to change your default SSH port (Port 22) to NON-Standard port. And you make sure that new SSH Port is allowed by your server fireWall.

Simple Steps:

1. Use ssh client such as Putty to log in to your server with old port (default 22).

2. Change SSH config file /etc/ssh/sshd_config

nano /etc/ssh/sshd_config

If nano editor is not installed on server, use this command to install it

yum install nano

or
Use vi command instead

vi /etc/ssh/sshd_config

Find this line:

#Port 22

Change to your own port and uncomment that line. Example:

Port 1111

Then open new PORT on your server. If you use CSF firewall, just log in to WHM and open CSF control panel then edit TCP_IN port.
Continue reading Centos: How to change SSH Port