Preventing dictionary-based attacks with DenyHosts
In this recipe, we will learn how to protect the SSH server from dictionary-based attacks with DenyHosts.
Experienced administrators will tell you that that DenyHosts is a recommended tool that can provide an added layer of protection against dictionary-based attacks. It maintains a small footprint, requires minimal configuration, and by works to monitor invalid login attempts. It is the purpose of this recipe to show you how this essential application can go a long way to keep your server safe.
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 repository.
How to do it...
DenyHosts is not installed by default, and for this...