Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer
Perfect, installs easily and acts like any other daemon. No feeling of hacking the system configuration here! – marcusw Feb 28 '10 at 14:03

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.

share|improve this answer
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .