SSH port change

Ubuntu / Debian

Open the SSH configuration file with your favorite text editor and find the lines that specifies the SSH port.

nano /etc/ssh/sshd_config

Default value:

#Port 22

Uncomment the relevant line by removing the # sign and change the default port 22 to the one that you want to use. In this article we will use port 1012.

Port 1012

Save the changes and exit.

Restart SSH service

Restart the SSH service for the changes to take effect.

service sshd restart
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.