Phy*_*iOS 3 google-authenticator
我安装了 google 身份验证器(两步验证),“libpam-google-authenticator”包,尽管它要求为每个到 SSH 的连接提供代码。我想将 localhost 和我自己的 ip 从谷歌身份验证器列入白名单,所以我和 localhost 跳过两步验证
或者有没有办法跳过某些 ip 的 SSH 挑战?
在“/etc/pam.d/sshd”中
auth [success=1 default=ignore] pam_access.so accessfile=/etc/security/access-local.conf
auth required pam_google_authenticator.so
Run Code Online (Sandbox Code Playgroud)
然后在“/etc/security/access-local.conf”
#localhost doesn't need two step verification
+ : ALL : 192.168.1.0/24
+ : ALL : LOCAL
+ : ALL : YOURIPHERE
#All other hosts need two step verification
- : ALL : ALL
Run Code Online (Sandbox Code Playgroud)
别忘了重启ssh
| 归档时间: |
|
| 查看次数: |
4231 次 |
| 最近记录: |