
Getting Started
Open the terminal and edit the /etc/ssh/sshd_config file with this command:
gksudo gedit /etc/ssh/ssh_config
or
gksudo nano /etc/ssh/ssh_config
Locate now this line (22 is the default SSH port):
Port 22
Change 22 to any appropriate port of your choice, then save your file and exit:
Restart now the SSH server with this command to take into account the new selected port:
sudo /etc/init.d/ssh restart
To test the new port, you can use this command by replacing username@hostname.com and 50692 with the new port selected and your own SSH details:
ssh username@hostname.com -p 50692
Note: This tutorial is done under Ubuntu 11.10 and is workable for older versions of Ubuntu.
Post a Comment