Post edited 9:53 pm – August 29, 2011 by mscott
Ok, so if you look at your logs you will see people from all over the world are trying to log into your SSH so they can take control of your server.. I'm not trying to scare you, it's just the truth. You NEED a good firewall (and mod_security) to stop this, but here is a quick tip to cut down on some of it without installing those. First open:
/ etc / ssh / sshd_config
and look for this line:
#Port 22
Change it to:
Port 6
This is assuming port 6 is unused on your server. Note the line originally had a # before it which means the config wasn't reading it and running on the default port (22). Remove the # if it's there.. if not just change the number to 6. Now if you ARE running a firewall open port 6 and close port 22 and restart SSH and the firewall. Done! Now all those mindless bots won't even get to try and crack your password!
Don't forget to tell anyone who has SSH access to change the port in their FTP/SSH software!