DenyHosts was shutting me out!

By John Bowen, 7 September, 2009

After a couple years without problems, suddenly [DenyHosts|http://denyhosts.sourceforge.net/] started blacklisting my own computers when I tried to ssh into the server. I wouldn't even get a chance to login; the ssh connection would just get dropped and that was it.

I've gotten myself blacklisted before (twice) by fat-fingering my password in wrong (twice in a row), but was always able to edit hosts.deny, remove my IP address, and go back to it. This time, when I would restart [DenyHosts|http://denyhosts.sourceforge.net/], my IP would go right back into hosts.deny and lock me back out.

I found [this article|http://www.cyberciti.biz/faq/linux-unix-delete-remove-ip-address-that-d…] which describes the fact that [DenyHosts|http://denyhosts.sourceforge.net/]holds onto IP addresses in multiple places...something I didn't know until now. The technique described there worked perfectly on my [Ubuntu|http://www.ubuntu.com] Jaunty server installation, with one substitution..."/var/lib/denyhosts", in place of the described "/usr/share/denyhosts".

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.