centos用lastb命令看失败登录记录

前端之家收集整理的这篇文章主要介绍了centos用lastb命令看失败登录记录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

lastb |less

lastb |tail

lastb |head


可以写个脚本,失败多少次后,就扔到/etc/hosts.deny里面去

如:

lastb |awk '{print $3}' |sort |uniq -c |sort -rn |awk '{print $2}' |head -25 |while read L;do echo "sshd:$L" >> /etc/hosts.deny;done


不生效可能是因为ldd /usr/sbin/sshd后没找到libwrap.so.0


参考文章http://75clouds.blog.51cto.com/3054635/1669397

原文链接:https://www.f2er.com/centos/376892.html

猜你在找的CentOS相关文章