Custom SSH port

Custom SSH port in Linux Server

Changing the SSH port to a custom one will increase security. This can be performed by changing the default value assigned to the directive “Port” in the configuration file /etc/ssh/sshd_config

Port 22666

Once the modification is completed,  restart the sshd server and check whether you are able to connect to the new port.

You can check  it using the following command

$ telnet  22666


Connected to

Escape character is ‘^]’.


Once you are able to connect, login to the server and confirm everything is working. Don’t close the current shell until the modification is confirmed to be working. Otherwise you might get locked out from the server.


There are no revisions for this post.

Tags: , , ,

No comments yet.

Leave a Reply