小编ben*_*ier的帖子

SSH 双因素身份验证 (2FA) 与 yubikey

所以我有这个漂亮的小 yubikey,我想在验证 ssh 会话时添加一个额外的安全层。在服务器端,我已经禁用了密码验证,并且只允许在登录时使用 ssh 密钥。

问题是,在为 yubikey auth 配置 sshd 和 PAM 之后,sshd 仍然只需要一个 ssh 密钥,我从未被要求提供来自 yubikey 的响应。

我如何同时需要ssh 密钥yubikey?

(ubuntu 14.04 - trusty)

/etc/pam.d/common-auth

auth    required    pam_yubico.so mode=client try_first_pass id=<id> key=<secret>
auth    [success=1 default=ignore]  pam_unix.so nullok_secure try_first_pass
# here's the fallback if no module succeeds
auth    requisite           pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets …
Run Code Online (Sandbox Code Playgroud)

ssh two-factor

13
推荐指数
1
解决办法
1387
查看次数

标签 统计

ssh ×1

two-factor ×1