Secure ssh access
Securing ssh access is extremely vital for any server. There are a few things that you can do to secure it. This article will cover one the basics.
- The first this that I recommend doing is changing the ssh port. This will prevent a lot of login attempts from automatic scripts trying port 22. To do this edit the file /etc/ssh/sshd_config
- Allow only SSH 2 protocol
pico /etc/ssh/sshd_config
Locate the line #Port 22, uncomment it and change the port to something random.
Note: Please remember to open this port in your firewall if you use one. Failure to do so may lock you out if your own server !
Again edit /etc/ssh/sshd_config, locate the line #Protocol 2,1 and change it to Protocol 2
After doing step 1 and 2 you have to restart sshd for the changes to take effect.
service sshd restart
If you enjoyed this post, make sure you subscribe to my RSS feed!
- September 12th


















[...] Restrict SSH Access [...]