Gentoo Archives: gentoo-user

From: Oliver Schmidt <oli@×××××××××××.ch>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] SSH authentication attempts - serious issue
Date: Mon, 05 Jun 2006 15:35:45
Message-Id: 1823.192.168.0.11.1149521244.squirrel@www.kernelpanic.ch
In Reply to: [gentoo-user] SSH authentication attempts - serious issue by Leandro Melo de Sales
1 > Hi,
2 >
3 > today when I was checking the server log I got many external
4 > attempts to connect to my sshd service:
5 >
6 > ...
7 > Jun 5 05:09:45 embedded sshd[4740]: Invalid user barbara from x.y.w.z
8 > Jun 5 05:09:46 embedded sshd[4742]: Invalid user barb from x.y.w.z
9 > Jun 5 05:09:48 embedded sshd[4744]: Invalid user barbie from x.y.w.z
10 > Jun 5 05:09:50 embedded sshd[4746]: Invalid user barbra from x.y.w.z
11 > Jun 5 05:09:51 embedded sshd[4748]: Invalid user barman from x.y.w.z
12 > Jun 5 05:09:53 embedded sshd[4750]: Invalid user barney from x.y.w.z
13 > ...
14 >
15 > this seems to be a brute force attack, but one thing that worried me
16 > is why sshd didn't disconnect the remote host after 3 unsuccessful
17 > attemps? If we see in the log, there are many attemps with time
18 > interval between attemps of 2 or 3 seconds meaning that the sshd
19 > didn't disconnect the remote host after 3 attempts.
20 > So, first, Am I thinking correct about the sshd attempts?
21 > Second, how can I setup sshd or the entire system to permit just 2 or
22 > 3 attempts of authentication? I was checking the /etc/login.defs file
23 > and I see the following option:
24 >
25
26 Try use Denyhosts ... no problem with bruteforce attacks anymore. Denyhosts
27 add the IP of the attacker to the /etc/hosts.deny file.
28 Install it with:
29 ACCEPT_KEYWORDS="~x86" emerge denyhosts
30 and add to your /etc/crontab
31 */10 * * * * root python /usr/bin/denyhosts -c /etc/denyhosts.conf
32
33 Use it now for more then a year... its perfect to block bruteforce attacks.
34
35 cheers
36 Oli
37
38
39 --
40 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] SSH authentication attempts - serious issue Richard Broersma Jr <rabroersma@×××××.com>
Re: [gentoo-user] SSH authentication attempts - serious issue Willie Wong <wwong@×××××××××.edu>
Re: [gentoo-user] SSH authentication attempts - serious issue Leandro Melo de Sales <leandroal@×××××.com>
Re: [gentoo-user] SSH authentication attempts - serious issue Steven Susbauer <stupendoussteve@×××××.com>