首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >2FA不使用Ubuntu实例。

2FA不使用Ubuntu实例。
EN

Stack Overflow用户
提问于 2022-03-29 07:00:05
回答 1查看 88关注 0票数 1

在EC2实例中执行ssh时,我致力于设置2FA。但是在安装之后,实例仍然没有请求2FA代码,并直接将我的用户,即ubuntu登录到服务器。

我完成了设置2FA的步骤:

  1. 安装模块。

数独apt安装libpam-google-authenticator

/etc/pam.d/sshd

  1. 添加auth required pam_google_authenticator.so

重新启动ssh sudo systemctl restart sshd.service

  1. 更新sshd_config如下:

ChallengeResponseAuthentication yes PasswordAuthentication no

google-authenticator

  1. 运行命令

请帮我解决这个问题。提前谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-31 11:03:53

因为启用了其他配置,所以我面临这个问题。使用PubKeyAuthentication代替身份验证器。我把它改为PubKeyAuthentication no,它解决了这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71657716

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档