2 SSH Brute-Force-Attack Countermeasures

By Daniel Miessler on December 9th, 2008: Tagged as Information Security
  • I already use a different port (443) and it works very well so far, no failed logins (except mine..) in the logs. I should consider using keys, but I'd like to use it simultaneously with a password, to make it more like a two-factors authentication. We learn something new everyday :)

  • since this is tagged security by obscurity, i'll let it pass.

  • bob schäfer

    great observation. the real trifecta is obscure port + keys only + only from restricted addresses, but honestly, i've had boxes in hostile networks for almost a decade and they all run with ssh on some ephemeral port and there's simply never failed attempts in my logs.


    hopefully, people will harken to your advice.

  • Brett Dreher

    Don't you feel you should mention that if you have multiple machines if you allow only key based authentication without a password that say once your key gets cracked, like this past year with the Debian issue, that someone will now have full access to your entire network without even using a single password?


    Passwords are not poor security practice if you use secure ones and rotate them sufficiently.


    Couldn't agree more on changing the ssh port, a decent option is that you set two ports for ssh on your machine, the default and an open one (say 22 and 24). Simply have your firewall only forward port 24 to the machine and it will save you from having to append the port number when you would like to access the machine from other local ones.

  • nerfed,


    Denyhosts is being bypassed by this; that's the whole point of the story. They don't care if you deny one IP or 100; they have thousands to try from. See?

  • nerfed

    I use Denyhosts (http://denyhosts.sourceforge.net/) on several production machines. It's a small python script that drops IP's of hosts into /etc/hosts.deny that try to brute force. You can set the threshold.

blog comments powered by Disqus

 

twitter_icon

Sample Original Content


Information Security

Tutorials and Primers

Culture & Society

Technology & Science

Politics

Philosophy & Religion

Miscellaneous

Tools & Projects


Blog Archives