linux make ssh secured

Only few fast tips to make your ssh connection more secured

  1. Change ssh port
  2. Install ssh guard

Edit file /etc/ssh/sshd_config

# What ports, IPs and protocols we listen for
#Port 22
Port 22222

Then restart ssh /etc/init.d/ssh restart. Done – standard bots will be no able to find this port, or it will take more time.

Install sshguard – it will temporary block IP which make few failed login.

apt-get update && apt-get install -y sshguard
iptables -N sshguard
ip6tables -N sshguard
iptables -A INPUT -j sshguard
ip6tables -A INPUT -j sshguard