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

相关文章
相关标签/搜索