Currently, my ssh server lets a user fail to login an infinite number of times (theoretically until the password is correctly guessed). I do not want this to be the case, I want the user to be banned for an arbitrary length of time after an arbitrary number of failed login attempts. I know that there are solutions availble and have tried at least three of them, but none has worked. I am wondering if anyone here has had a more successful experience than I, and how I might get something like this working with minimal hassle. Thanks!

I have a Kubuntu 9.10 system running the latest debian-stable openssh-server package.


Take a look at DenyHosts

I've just recently installed it after someone tried to bruteforce me, so I don't have any experience with it, but it'll do what you want. In the configuration you can even set it up to send you an email when it blocks someone.

It may or may not be in the Ubuntu repositories; I don't use Ubuntu so I don't know.


You don't mention which ones you've tried already. I've used fail2ban on servers before, but not recently so I'm not sure how much has changed. Here's a good writeup about using it with ssh.

  • This is one that I tried and didn't get to work. I guess I should have mentioned that... – marcusw Feb 28 '10 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.