ubuntu ssh设置google验证码登录双重验证

安装google-authenticator

apt-get update
apt-get install libpam-google-authenticator
#添加认证
google-authenticator

设置开启验证

vi etc/pam.d/sshd 
#添加
auth required pam_google_authenticator.so
vi /etc/ssh/sshd_config
ChallengeResponseAuthentication no 
#改为 
ChallengeResponseAuthentication yes
service ssh restart

你可能感兴趣的:(ubuntu ssh设置google验证码登录双重验证)