centos7设置登陆失败自动锁定用户10分钟,centos710分钟
centos7设置登陆失败自动锁定用户10分钟,centos710分钟
vim /etc/ssh/sshd_config 修改参数UsePAM 为yes
UsePAM yes
重启sshd服务
vim /etc/pam.d/login 在第二行添加
auth required pam_tally2.so deny=3 lock_time=600 even_deny_root root_unlock_time=600
vim /etc/pam.d/sshd 在第二行添加
auth required pam_tally2.so deny=3 unlock_time=600 even_deny_root root_unlock_time=600
修改后重启服务器,进行ssh错误登陆测试,使用pam_tally2查看错误记录
pam_tally2 -u appuser Login Failures Latest failure From appuser 7 03/30/18 09:41:58 172.18.18.161
评论暂时关闭