Knowledgebase

How to Change SSH Port in Centos Print

  • 1

Login into your Server Via Putty or any SSH client.

type in following command

vi /etc/ssh/sshd_config

press "i" to edit file

2, Go down to part that says "#Port 22"

remove the "#" from the front of the line

and edit the port you want 

Example

Port 1023

press Esc

type in ":wq" to save the file and exit

type in following command to restart the SSH service.

/etc/init.d/sshd restart

now you can login to your server via new ssh port.

Was this answer helpful?
« Back