git clone https://github.com/google/google-authenticator-libpam.git cd google-authenticator-libpam/ ./bootstrap.sh ./configure sudo make sudo make install
Do you want authentication tokens to be time-based (y/n) #基于时间生成身份验证 #已经安装qrencode会产生一个二维码,二维码连接也可以URL显示 Your new secret key is :*********** # 密钥key Your verification code is : #code 动态码 Your emergency scratch codes are: # 生成5 个紧急救助码 Do you want me to update your "/root/.google_authenticator" file? (y/n) #一直确认下去 # 生成了一个 .google_authenticator 文件
your chances to notice or even prevent man-in-the-middle attacks (y/n) #一直确认下去 Do you want to do so? (y/n) #一直确认下去 Do you want to enable rate-limiting? (y/n) #设置完成