CentOS7 限制SSH密码尝试次数

 编辑配置文件:

vi /etc/pam.d/sshd

在文末添加内容:

auth       required     pam_tally2.so deny=5 unlock_time=600

代表失败5次,禁止访问600秒

保存退出

重启sshd服务

systemctl restart sshd

参考:传送门

原文地址:https://www.cnblogs.com/flying607/p/10416554.html