登陆3次失败,则该用户限制一小时内不能登陆

vi /etc/pam.d/sshd
输入:
auth required pam_tally2.so deny=3 unlock_time=3600 even_deny_root root_unlock_time=3600

image-1655097142715

vi /etc/pam.d/login
auth required pam_tally2.so deny=3 unlock_time=3600 even_deny_root root_unlock_time=3600

image-1655097153767

参考网址:https://blog.csdn.net/weixin_43822878/article/details/93018223

Q.E.D.


知之为知之