因需要ansible管理,需要跳过GA验证
cat /etc/pam.d/sshd
#%PAM-1.0
auth [success=1 default=ignore] pam_access.so accessfile=/etc/security/access-localhost.conf
auth required pam_google_authenticator.so
添加要跳过的IP
cat /etc/security/access-localhost.conf
#skipped local network for google auth...
+ : ALL : 192.168.2.198/32
+ : ALL : 192.168.2.178/32
+ : ALL : 127.0.0.1
- : ALL : ALL
阅读(554) | 评论(0) | 转发(0) |