在这个链接http://www.cyberciti.biz/faq/block-ssh-attacks-with-denyhosts/如果你search下面
grep 'from' /var/log/auth.log|cut -d ' ' –field=13 | uniq -c | sort -nr > ct-result.txt
注释说grep所有的IPs,把它们放到/etc/hosts.deny我想尝试什么评论说,但当我这样做,我得到以下错误切:你必须指定一个字节,字符或字段的列表“
我到底该做什么?
另外我如何确保如果我安装了denyhosts,那么它正在工作。 我安装了,但看不到守护进程运行。 ps -el | grep denyhosts ps -el | grep denyhosts没有输出。
另外当我检查TCP包assembly置
tcpdchk -v Cannot find your inetd.conf or tlid.conf file. Please specify its location.
这是什么抱怨?
尝试以root身份运行该命令(将sudo添加到您的命令中)或者可以访问auth.log的人员。
如果你没有安装inetd,tcpdchk看起来不会起作用。 如果您将ssh作为守护程序运行,则不需要inetd。 您可以检查ssh是否使用tcpwrappers:
ldd / usr / sbin / sshd | grep libwrap
它应该显示sshd正在与tcpwrapper库链接。
确保以root身份启动denyhosts服务,并检查denyhosts日志文件以查看它是否正在运行。
有关详细信息,请参阅denyhosts站点: