我收到这些错误:
e Jan 15 15:05:00 APPLES sshd [32305]:用户根不允许,因为没有在AllowUsers中列出
Jan 15 15:05:00 APPLS sshd [32305]:input_userauth_request:invalid user root [preauth]
Jan 15 15:05:00 APPLES sshd(pam_google_authenticator)[32307]:无法读取“/root/.google_authenticator”
Jan 15 15:05:00应用sshd [32305]:错误:PAM:无法为非法用户root的指定会话创build/删除条目
Jan 15 15:05:00 APPLS sshd [32305]:从端口53287 ssh2无效的用户root的键盘交互式/ pam失败
Jan 15 15:05:11 APPLES sshd(pam_google_authenticator)[32305]:无法读取“/root/.google_authenticator”
1月15日15:05:11 APPLES sshd [32305]:无效的用户root的密码从端口53287 ssh2
1月15日15:05:11 APPLES sshd [32305]:断开连接:根authentication失败太多[preauth]
你有两种方法:
删除谷歌authentication
sudo apt-get remove libpam-google-authenticator
在文件/etc/pam.d/sshd中删除
auth required pam_google_authenticator.so
在文件/ etc / ssh / sshd_config中改为No
ChallengeResponseAuthentication yes
重新安装Google身份validation
sudo apt-get install libpam-google-authenticator google-authenticator
按照屏幕上的指示。 你将需要一个手机来读取QR码 (这将生成控制台),并从市场的Google身份validation器安装apk。 对当前用户使用google-authenticator命令,或将结果复制到/home/USERNAME/.google_authenticator中的其他用户
更改后不记得重新启动SSHD
/etc/init.d/ssh restart