3
尝试使用公共密钥(无密码)和可在Ubuntu 14.04.1上运行的Google Authenticator获取SSH
我正在使用Ubuntu 14.04.1(带有OpenSSH 6.6和libpam-google-authenticator 20130529-2)。 我正在尝试建立SSH登录名,以对公钥进行身份验证(无密码),并提示用户输入来自Google身份验证器的代码。 按照/适应这些说明,我得到了密码提示和Google Auth提示: https://scottlinux.com/2013/06/02/use-google-authenticator-for-two-factor-ssh-authentication-in-linux/ http://www.howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/ https://wiki.archlinux.org/index.php/Google_Authenticator和https://wiki.archlinux.org/index.php/SSH_keys#Two-factor_authentication_and_public_keys https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-two-factor-authentication 我已经安装了包,我的编辑/etc/ssh/sshd_config和/etc/pam.d/ssh文件 在/etc/ssh/sshd_config: ChallengeResponseAuthentication yes AuthenticationMethods publickey,keyboard-interactive UsePAM yes 和在底部/etc/pam.d/ssh: auth required pam_google_authenticator.so nullok # (I want to give everyone a chance to set up their 2FA before removing "nullok") 我知道PAM取决于订单,但是sshd_config也取决于订单吗? 我究竟做错了什么?任何帮助,将不胜感激。