Block SSH Server Attacks (Brute Force Attacks) Using DenyHosts

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

17 Responses

  1. Chacko Abraham says:

    Hi All

    Can we block multiple services on denyhosts like BLOCK_SERVICE = sshd,proftpd and also can these block public IP’s as well.


    • Ravi Saive says:

      Using DenyHosts, you can only block SSH attacks, but if you want to block other services such as ftp, mail, etc, you can use xinetd functionality called hosts.deny.

  2. Fahad Rafiq says:

    Password crackers are using automated scripts to target websites to hack the passwords and Brute Force Attacks have become a common thing, but many don’t know the concept behind it and how these attacks are so successful at cracking the passwords of the websites.

    The easiest method to block such attacks is by blacklisting the IPs that carry out such abuses, many hosting providers have added Brute Force Attacks protection in their added security features.

    For more information about these attacks read:

  3. Shaun says:

    Thank you!

  4. Mohammad Farooque says:

    HI All,

    Every day morning iptables rules would be automatically flushed. I dont know how,,,

    Please help me to resolve this issue.

  5. No denyhosts available in EPEL for RHEL7/CentOS7 yet.

  6. cosgunvistas says:

    Very Nice article. I have one suggestion. This article work just fine for Ubuntu 12.04 Server, except installation which can be done with

    sudo apt-get install denyhosts

    So i recomment just add Ubuntu to the list. And add the installation method.

  7. ashutoshh says:

    great work…

  8. Bharath says:

    Hi, am using CentOS release 5.7 (Final), i can’t install denyhosts with yum, provided i have enabled epel repo and logged in as root.

    when i run #yum install denyhosts

    it gives,
    “Setting up Install Process
    No package denyhosts available.
    Nothing to do”

    what is the problem here. pls advice.

  9. Rifat Rahman says:

    It works nice. Played with the thing and it is fantastic for ssh securities.. Thanks for keeping all things at one place.

  10. I do trust all of the concepts you’ve offered to your post. They’re really convincing and will certainly work. Still, the posts are too brief for newbies. May you please prolong them a bit from next time? Thanks for the post.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.