OpenSSH使用(公钥或密码)+谷歌身份validation
我想要允许这两种身份validationtypes:公钥+谷歌authenticator 或密码+谷歌authenticator。 我在我的sshd_config有以下内容: AuthenticationMethods publickey,keyboard-interactive:pam password,keyboard-interactive:pam UsePAM yes ChallengeResponseAuthentication yes PubkeyAuthentication yes PasswordAuthentication yes 而在/etc/pam.d/ssh我没有注释 #@include common-auth and added auth required pam_google_authenticator.so 在文件的末尾。 键+令牌路由仍然有效,但由于某种原因,我的密码总是被“拒绝访问”消息拒绝。 我发现只要将UsePAM设置为“是”,密码validation就会失败。 不知道为什么? /etc/pam.d/sshd的内容:(这个文件对我来说似乎很长,但这只是Ubuntu的默认值,也许我可以把它缩短一下?) # PAM configuration for the Secure Shell service # Standard Un*x authentication. #@include common-auth # Disallow non-root logins when /etc/nologin exists. account required pam_nologin.so # Uncomment and edit […]