Protecting SSH with fail2ban
In this recipe we will learn how to implement additional security measures by protecting SSH server with a package called fail2ban.
Fail2ban is a tool that serves to protect a variety of services against unwanted visitors. It works by reading logfiles for patterns based on failed login attempts and deals with the offending IP addresses accordingly. Of course, you may have already hardened your SSH server and employed the necessary firewall rules, but it is the purpose of this recipe to show that when faced with the possibility of Brute Force Attacks, an added layer of protection is always useful.
Getting ready
To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges, a console-based text editor of your choice, and a connection to the Internet in order to facilitate the download of additional packages. In addition to this, it will be assumed that Yum is already configured to download packages from the EPEL...