[root@localhost~]# git clone https:~-xr-x root root12月:google-authenticator-~]# cd google-authenticator-libpam/-authenticator-libpam]#./bootstrap.-authenticator-libpam]#./-authenticator-libpam]#&&-authenticator-libpam]# google--authenticator-libpam]# cd~~]# vim/etc/pam.d/~]# vim/etc...
yum install google-authenticator -y 或者 dnf install google-authenticator -y 3、安装这个(用于显示二维码) yum install qrencode-libs -y 4、运行这个 google-authenticator 5、 5.1、添加谷歌身份验证器PAM模块 在vi /etc/pam.d/sshd文件最后添加谷歌身份验证器PAM模块配置: ...
auth required pam_google_authenticator.so[root@test~]# vim/etc/ssh/sshd_config...ChallengeResponseAuthentication yes #修改no为yes[root@test~]# service sshd restart 四、使用google authenticator PAM插件为ssh登录账号生成动态验证码 注意:哪个账号需要动态验证码,请切换到该账号下操作。(可以在不同用户下执...
市面上有基于硬件的,也有基于软件的产品,具体可以另搜啊,本人喜欢开源的东东,并找到了Google开源的二次认证系统Google Authenticator OpenSource,可以利用智能手机生产30秒动态口令配合登陆linux系统,该验证器提供了一个六位数的一次性密码。目前ios和Android都有客户端供于下载。 三、目的 1.实现登陆linux 服务器时,先...
[root@test ~]# cd google-authenticator/libpam/ 2016-12-10日 更正记录:由于谷歌 github上将libpam 认证模块放到一个单独项目内,4.3.4步骤已过时,下面是新的下载源码方式: [root@test ~]# git clone https://github.com/google/google-authenticator-libpam.git ...
设置了linux,远程登录系统一直无法登录(录入密码和google-authenticator秘钥后,又重新让录入密码),关闭SELinux后正常,打开就又无法登录,网上找了很多地方都无法解决,或者都是直接让关闭SELinux,下面可以解决正常开启SELinux也可以正常登录的方案。 由于版本比较多,每个都不太一眼,我只测试了大概得,可以根据实际情况自行测...
[root@test ~]# git clone https://github.com/google/google-authenticator-libpam.git 1. 进入刚刚git下载的目录中,进行编译安装 [root@test ~]# cd google-authenticator/libpam/ 1. [root@test libpam]# ./bootstrap.sh [root@test libpam]# make && make install ...
默认情况下,SSH已经使用远程机器之间的安全数据通信,但是如果您想为您的 SSH 连接添加一些额外的安全层,您可以添加一个Google Authenticator(双因素身份验证)模块,该模块允许您输入一个随机的连接SSH服务器时的时间密码 (TOTP) 验证码。连接时,您必须从智能手机或PC输入验证码。
auth required pam_google_authenticator.so “` 这将要求用户在登录时提供一次性密码(OTP)。 2、配置SSHD:编辑SSH配置文件以启用PAM。 “`bash sudo vi /etc/ssh/sshd_config “` 添加或修改以下行: “`bash UsePAM yes “` 保存并关闭文件。 3、生成秘钥:使用googleauthenticator命令为用户生成秘钥。
auth required pam_google_authenticator.so :wq!#保存退出 vi /etc/ssh/sshd_config#编辑 ChallengeResponseAuthentication yes#修改no为yes :wq!#保存退出 service sshd restart#重启ssh服务,使配置生效 六、使用google authenticator PAM插件为ssh登录账号生成动态验证码 ...