将ssh失败的用户放入hosts.deny中

1.find / -name secure

找到linux系统安全日志文件

2.cp `find / -name secure` /tmp/`date +%F`

将secure文件复制出来

或者使用find -exec或xrags

3.grep "Failed password" secure | awk '{print "sshd:"$11}' | sort | uniq>> /etc/hosts.deny

原文地址:https://www.cnblogs.com/lianyg/p/10500898.html