記錄 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中添加便可
最後實現過程