linux – 使用ssh配置pam以进行双因素身份验证

我正在尝试使用自定义radius服务器配置ssh以进行身份??验证.

所以我想要的是,首先它应该使用当前的ssh登录(unix登录)进行身份验证,然后提示用户输入radius的第二个密码.

我正在设置/etc/pam.d/sshd如下

auth        required    pam_unix.so debug

**auth       sufficient   /lib/security/pam_radius_auth.so  debug conf=/home/pam_radius try_first_pass**

但是我的第一次身份验证根本不会发生.它立即进入半径.

根据pam_radius ..try_first_pass

….If there was no previous password,or
the previous password
fails authentication,prompt the user with
“Enter RADIUS password: “,and ask for another
password.
Try this password,and return success/failure as
appropriate.

解决方法

我无法回复其他答案的评论,但您是否尝试将两个auth行设置为required而不是将radius设置为足够?

相关文章

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注