ssh+Google雙重認證

記錄  SSH + Google-Authenticator 實現過程服務器


環境Centos 6.5 app


須要用到epel源,用網易和搜狐的源都沒有找到安裝包,單獨下載須要×××ssh


在服務器上安裝Google-Authenticatoride

  1. 首先安裝啓用ntp 服務器,同步服務器時間,設置時間同步ui

  2. 安裝Google-authenticator,安裝完成後,會在/lib64/security新增pam_google_authenticator.so 文件google

    yum install google-authenticator spa

  3. 配置/etc/pam.d/sshd3d

    添加 auth     required   pam_google_authenticator.soblog

  4. 配置/etc/ssh/sshd_config ci

    ChallengeResponseAuthentication yes (改成yes)

wKioL1RFvumSjj1XAABRqm_2HF8119.jpg

5. 重啓ssh  

6. 執行google-authenticator 生成私鑰 ,在app中添加便可

最後實現過程 


wKioL1RFvxyhQkz5AABd00uIyqk636.jpg

wKioL1RFvx2zEKwyAABW39MbC-M749.jpg

相關文章
相關標籤/搜索