Ssh – How should I manually add IP addresses to denyhosts

blacklistbrute-force-attacksdenyhostsSecurityssh

I have a few IP addresses I want to add manually to denyhosts because they're huge sources of inbound spam. What's the best way to do this? Or should I not be messing with it?

I want to manually add these to denyhosts, but I don't see a way to do it through any program options. I see nothing in denyhosts.py --help.

It looks like it could be as simple as adding a line to /etc/hosts.deny, but since the process to delete an IP (see here on ServerFault and the DenyHosts FAQ) involves updating six files, it makes me think it's not "Can't You Just… add the IP to the file?".

Best Answer

Denyhosts uses the standard /etc/hosts.deny file; you can add your IPs there.

Whoever told you deleting an IP takes 6 edits was delusional; any entries in hosts.deny not added by denyhosts are not special in any way - you just delete them.