在新的Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-1017-aws x86_64)上,我已经安装了Google 1,并按照以下方式配置了它
/etc/pam.d/sshd
#@include common-auth
...
auth required pam_google_authenticator.so nullok
/etc/ssh/sshd_config
...
ChallengeResponseAuthentication yes
...
AuthenticationMethods publickey,keyboard-interactive它在Ubuntu 16上工作,但Ubuntu 18在尝试登录时出现以下错误:
$ ssh ubuntu@server
ubuntu@server: Permission denied (keyboard-interactive).新版本的Ubuntu似乎发生了一些变化。
当我启用调试时,没有进一步的信息。
Aug 17 11:40:31 ip-10-0-0-182 sshd(pam_google_authenticator)[6834]: debug: start of google_authenticator for "ubuntu"
Aug 17 11:40:31 ip-10-0-0-182 sshd[6832]: error: PAM: Permission denied for ubuntu from X.X.X.X
Aug 17 11:40:32 ip-10-0-0-182 sshd[6832]: Connection closed by authenticating user ubuntu X.X.X.X port 61076 [preauth]ps。主目录未加密。
1 apt-get install libpam-google-authenticator
发布于 2018-11-06 06:45:40
在18.04,我尝试删除AuthenticationMethod行,它对我起作用
https://serverfault.com/questions/926828
复制相似问题