---
name: "denyhosts"
section: "8"
platform: "linux"
package: "denyhosts"
version: "2.6-10+deb7u3"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/denyhosts"
---

# denyhosts(8)

version: 2.6

## NAME

DenyHosts - version: 2.6

## DESCRIPTION

**DenyHosts** is a python program that automatically blocks ssh attacks by adding entries to /etc/hosts.deny. **DenyHosts** will also inform Linux administrators about offending hosts, attacked users and suspicious logins.

Usage: /usr/sbin/denyhosts \[-f logfile \| **--file**=*logfile\]* \[ **-c** configfile \| **--config**=*configfile\]* \[-i \| **--ignore\]** \[-n \| **--noemail\]** \[--purge\] \[--migrate\] \[--daemon\] \[--sync\] \[--version\]

- **--file**:

  The name of log file to parse

**--ignore**: Ignore last processed offset (start processing from beginning)

**--noemail**: Do not send an email report

**--unlock**: if lockfile exists, remove it and run as normal

**--migrate**: migrate your HOSTS\_DENY file so that it is suitable for **--purge**

**--purge**: expire entries older than your PURGE\_DENY setting

**--daemon**: run DenyHosts in daemon mode

**--foreground**: run DenyHosts in foreground mode

**--sync**: run DenyHosts synchronization mode

**--version**: Prints the version of DenyHosts and exits

Note: multiple **--file** args can be processed.  If multiple files are provided, **--ignore** is implied

Note: in a debian system, the default running mode is **daemon mode** and the configuration file is **etc/denyhosts.conf**

### When run in --daemon mode the following flags are ignored:

**--file**, **--purge**, **--migrate**, **--sync**, **--verbose**

## SEE ALSO

Please refer to http://denyhosts.sourceforge.net/faq.html for full documentation This file can be also found in /usr/share/doc/denyhosts/FAQ.html

## AUTHOR

**DenyHosts** was written by Phil Schwartz \<phil\_schwartz@users.sourceforge.net\>

This manual page was written by Marco Bertorello \<marco@bertorello.ns0.it\> for the Debian project (but may be used by others).
