在EC2实例中执行ssh时,我致力于设置2FA。但是在安装之后,实例仍然没有请求2FA代码,并直接将我的用户,即ubuntu登录到服务器。
我完成了设置2FA的步骤:
数独apt安装libpam-google-authenticator
/etc/pam.d/sshd向
auth required pam_google_authenticator.so重新启动ssh sudo systemctl restart sshd.service的
ChallengeResponseAuthentication yes PasswordAuthentication no
google-authenticator
请帮我解决这个问题。提前谢谢。
发布于 2022-03-31 11:03:53
因为启用了其他配置,所以我面临这个问题。使用PubKeyAuthentication代替身份验证器。我把它改为PubKeyAuthentication no,它解决了这个问题。
https://stackoverflow.com/questions/71657716
复制相似问题