记录 SSH + Google-Authenticator 实现过程服务器
环境Centos 6.5 app
须要用到epel源,用网易和搜狐的源都没有找到安装包,单独下载须要×××ssh
在服务器上安装Google-Authenticatoride
首先安装启用ntp 服务器,同步服务器时间,设置时间同步ui
安装Google-authenticator,安装完成后,会在/lib64/security新增pam_google_authenticator.so 文件google
yum install google-authenticator spa
配置/etc/pam.d/sshd3d
添加 auth required pam_google_authenticator.soblog
配置/etc/ssh/sshd_config ci
ChallengeResponseAuthentication yes (改成yes)
5. 重启ssh
6. 执行google-authenticator 生成私钥 ,在app中添加便可
最后实现过程