Re: sshd: Preventing people trying lots of logins
From: Andrew Schulman (andrex_at_deadspam.com)
Date: 12/30/04
- Next message: Asmo: "Login shell"
- Previous message: Benno: "Re: Preventing people trying lots of logins"
- In reply to: Stuart Moore: "sshd: Preventing people trying lots of logins"
- Next in thread: Gandalf Parker: "Re: sshd: Preventing people trying lots of logins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 30 Dec 2004 12:03:11 -0500
> I'm running a linux box with fedora core 2 over a home DSL connection.
I
> keep seeing entries in the logs suggesting that a given host has tried
> to make many (100+) connections to my ssh server, using a variety of
> different usernames (some common first names, others names like apache,
> webmaster etc)
>
> I think I'm pretty safe as the only usernames that sshd will allow to
> log in aren't dictionary names, but even so it'd be nice if I could make
> sshd refuse to talk to a host after e.g. 10 failed authentications.
>
> Any ideas? I've tried looking in FAQs and doing suitable google
> searches, but I've had no luck so far.
There was a thread about this on comp.security.ssh, I believe, a few
weeks ago. Sorry but I can't remember the thread title. But I don't
believe anyone came up with any neat or out-of-the-box solutions.
Someone described a PAM setting that would help in some respect, but I
don't remember what it was. But at least that could provide a hook for
finding the thread.
Recently in Debian I came across bld, the blacklist daemon. This is a
generic tool that constructs blacklists of IP addresses based on the
number of submissions within a certain time. You would have to set up a
cron script to feed it IP addresses from your ssh logs, then another one
to regularly retrieve the blacklist and insert it into your
/etc/hosts.deny. But this doesn't sound too bad, and it would exactly
address your problem.
Good luck,
Andrew.
-- To reply by email, replace "deadspam.com" by "alumni.utexas.net"
- Next message: Asmo: "Login shell"
- Previous message: Benno: "Re: Preventing people trying lots of logins"
- In reply to: Stuart Moore: "sshd: Preventing people trying lots of logins"
- Next in thread: Gandalf Parker: "Re: sshd: Preventing people trying lots of logins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|