Koozali.org: home of the SME Server

Automatically blacklist ssh break-in attempts?

Offline holck

  • *
  • 322
  • +1/-0
Automatically blacklist ssh break-in attempts?
« 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
......

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Automatically blacklist ssh break-in attempts?
« Reply #1 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.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline crazybob

  • *****
  • 894
  • +0/-0
    • Stalzer R&D
Re: Automatically blacklist ssh break-in attempts?
« Reply #2 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.
If you think you know whats going on, you obviously have no idea whats going on!

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: Automatically blacklist ssh break-in attempts?
« Reply #3 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
C'est la fin du monde !!! :lol:

Offline holck

  • *
  • 322
  • +1/-0
Re: Automatically blacklist ssh break-in attempts?
« Reply #4 on: December 03, 2010, 04:00:10 PM »
Thank you very much, Daniel, you are quite right!
......