我正在尝试为 OpenSSH 实施两因素身份验证。环境是 Centos 7(内核:3.10.0-229.1.2.el7.x86_64)和 OpenSSH_6.6.1p1,OpenSSL 1.0.1e-fips 2013 年 2 月 11 日。我们部署了 Active Directory (LDAP) + Kerberos。规格如下:
为了执行第二个因素的身份验证过程,有第 3 方可用的 PAM 模块,它对 Kerberos 一无所知。所以这就是我所做的:
将这些行放入 /etc/ssh/sshd_config:
# To enable PAM - this will make sshd use PAM with configuration /etc/pam.d/sshd
UsePam yes
ChallengeResponseAuthentication yes
# To enable Kerberos and public key authentication - it will let sshd use existing Kerberos tickets
GSSAPIAuthentication yes …Run Code Online (Sandbox Code Playgroud)