How To Delete/Remove Blocked IP From DenyHosts

Medical Technology, Healthcare & Government IT

Category Groups
  1. First you need to stop Denyhosts service, by following command.

    [[email protected] ~]# /etc/init.d/denyhosts stop

  2. Next open file /etc/hosts.deny with below command.

    [[email protected] ~]# vi /etc/hosts.deny

  3. Delete blocked IP address, then save and close above file.

  4. Now go to directory called /usr/share/denyhosts/data or /var/lib/denyhosts/

    [[email protected] ~]# cd /var/lib/denyhosts/

  5. Next you need to delete blocked IP from all below following files with help of vi editor.

    [[email protected] ~]# vi hosts
    [[email protected] ~]# vi hosts-restricted
    [[email protected] ~]# vi hosts-root
    [[email protected] ~]# vi hosts-valid
    [[email protected] ~]# vi users-hosts

  6. Once you removed your blocked IP from all above files, then start Denyhosts service.

    [[email protected] data]# /etc/init.d/denyhosts start

Original Link

Leave a Reply