Changing SSH Port

Secure Shell Port - Tutorials

Changing Secure Shell Default Port (22)

The default port number is (22/TCP). You can set the port number of the server according to your requirements. Here is a detailed tutorial on how to do it.

Step 1:

First of all, you will have to open the SSH configuration file to change the port, thus, execute the following command in the terminal: nano /etc/ssh/sshd_config

Here at my case. I've used Port 3468. You can change 22 to whatever Port you want.

Step 2:

Save the changes with the following keys (CTRL+X) then hit 'Y' on your keyboard then 'Enter'. Now the changes are applied.

Step 3:

Restart SSH with the following command:

service sshd restart

From now on. You will be able to login with your custom SSH Port!

Last updated