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
Leave a Reply
You must be logged in to post a comment.