I had some trouble configuring denyhost on my Mac OS X 10.6 (user) machine as the instructions on the website @ http://www.denyhosts.net/faq.html#macos were wrong. Here is the correct configuration for denyhosts.cfg:
denyhosts.cfg # Mac OS X (v10.4 or greater - # also refer to: http://www.denyhosts.net/faq.html#macos # SECURE_LOG = /private/var/log/asl.log # SSHD_FORMAT_REGEX=.* \[Sender sshd\] \[PID \d*\] \[Message .* PAM: (?P.*?)\].*? # Mac OS X (v10.6 or greater - # - reversion to standard log format. No need to do log regex parsing. SECURE_LOG = /var/log/secure.log # zip down a bit to the bottom: #this work_dir worked for me, it's where the python install script added it: WORK_DIR = /usr/share/denyhosts/data #this lock_file worked for me although I had to create the directory: LOCK_FILE = /var/lock/subsys/denyhosts
and then for the file [daemon-control]:
############################################### #### Edit these to suit your configuration #### ############################################### DENYHOSTS_BIN = "/usr/local/bin/denyhosts.py" DENYHOSTS_LOCK = "/var/lock/subsys/denyhosts" DENYHOSTS_CFG = "/usr/share/denyhosts/denyhosts.cfg" PYTHON_BIN = "/usr/bin/env python"
Hope this helps! This is only really necessary if your Mac is on the internet with a static IP and not behind a firewall or NAT router. 99.9% of home machines are ok because they are hidden behind NAT routers, it's mostly academic machines that are in danger.