Improving security for SSH
There are two things to increase the security for ssh logins.
Change SSH PortTo change the SSH port, simply edit the sshd_config file with the commmand
sudo nano /etc/ssh/sshd_configand change the line
Port 22to something higher. Make sure to stay below 65,000 and don’t use any port which is already used by another service like 80 (web). After changing and saving the file, simply restart the ssh daemon and reload the configuration with
sudo /etc/init.d/ssh reload. Done.
Disable password based login for SSHTo disable the password based login for all the users, you can do the following:
# Open the sshd config file sudo nano /etc/ssh/sshd_config
RSAAuthentication yes PubkeyAuthentication yes