Ubuntu 12 - Change ssh port

If your computer is exposed to the most dangerous network out there, the internet, you may want to change your ssh port as a first step in preventing automated attacks. This is relatively simple in ubuntu. Simply do this:
sudo vi /etc/ssh/sshd_config
Find where it specifies port 22 and change it to a number greater than 1024 that you will remember, (and doesnt clash with any other applications ports that you may have running, such as utorrent etc.
Don't forget that if you have iptables (usually managed by ufw in ubuntu) then you will need to allow this new port you just set up. Dont forget to close up port 22 afterwards as well.

No comments:

Post a Comment