Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: holck on November 30, 2010, 11:44:58 PM

Title: Automatically blacklist ssh break-in attempts?
Post by: holck on November 30, 2010, 11:44:58 PM
I have my host accessible for administration from external IP addresses, but as an unfortunate consequence of this I often experience ssh break-in attempts, where some external machine tries lots of different user names and password.

I would like some feature like this script (http://www.pettingers.org/code/sshblack.html), that automatically black-lists outside hosts after a number of failed login attempts. Has anyone installed something like that on an SME-server?

Jesper, Denmark
Title: Re: Automatically blacklist ssh break-in attempts?
Post by: janet on December 01, 2010, 04:01:46 AM
holck

Why don'y you setup public private key access for ssh, see the Howto. That way it can be accessed from anywhere (that has the key) but is very safe & hackers will be unable to crack it. If you are roaming/travelling, you can carry the key file on a USB stick.

Alternatively you can specify the remote host IPs that are allowed to access via ssh, using db commands, see the FAQ.
Title: Re: Automatically blacklist ssh break-in attempts?
Post by: crazybob on December 01, 2010, 05:34:05 AM
another option is to set the ssh port to a nonstandard port number. It makes it harder to find.
Title: Re: Automatically blacklist ssh break-in attempts?
Post by: Daniel B. on December 01, 2010, 09:06:29 AM
I would like some feature like this script (http://www.pettingers.org/code/sshblack.html), that automatically black-lists outside hosts after a number of failed login attempts. Has anyone installed something like that on an SME-server?

Look at the denyhosts contrib: http://wiki.contribs.org/Denyhosts it does exactly what you want.

Regards, Daniel
Title: Re: Automatically blacklist ssh break-in attempts?
Post by: holck on December 03, 2010, 04:00:10 PM
Thank you very much, Daniel, you are quite right!