Perhaps you, like many *nix users, like to remotely connect to your desktop and/or servers and thus are propably running an ssh-server. If so and you have ever checked logs for failed attempts to log in then you know that attempts to login with random usernames and passwords are made constantly. And finally, if you are like me, you are constantly worried that your username and the password, even though naturally a hard one to come up with, might one day be entered by person - or rather a brute force password cracking script - and thus your system getting compromized.
There is a simple tool to deny hosts from connecting the ssh-server (couple tools even, but here is one) after failing defined number of times - and if configured to, the program will send email report of new denied hosts and suspicious connection attempts. denyhosts is the program I use for this, and here is how to set up it:
(more…)