Debian服务器如何设置双因素身份验证
在Debian服务器上设置双因素身份验证,首先安装`libpam-google-authenticator`包。然后,使用命令`google-authenticator`生成密钥和二维码。编辑`/etc/ssh/sshd_config`,启用`ChallengeResponseAuthentication yes`。接着,修改`/etc/pam.d/sshd`,添加`auth required pam_google_authenticator.so`。最后,重启SSH服务,执行`systemctl restart sshd`,即可启用双因素身份验证。