January 28, 2016

使用Google Authenticator两步验证加强SSH登录

Google Authenticator开源版主页 https://github.com/google/google-authenticator 安装Google Authenticator Ubuntu已经包含libpam-google-authenticator软件(Ubuntu 11.10以上版本),可以直接使用apt-get安装 apt-get install libpam-google-authenticator 其他系统可以通过源码编译安装 git clone https://github.com/google/google-authenticator-libpam.git cd google-authenticator-libpam/ ./bootstrap.sh ./configure make make install 注意:在Debian7中执行./configure时可能存在以下错误提示 configure: error: Unable to find the PAM library or the PAM header files 在此需要安装libpam0g-dev和libtool apt-get -y install libpam0g-dev libtool 设置Google Authenticator 在手机端搜索安装Google Authenticator google-authenticator Do you want authentication tokens to be time-based (y/n) y 然后出现二维码,使用手机端Google Authenticator扫码,接下来服务器端继续设置 如果没有出现二维码,可以将提示的以https://www.google.com/chart?开头的连接复制到浏览器中,就可以看到二维码了 Do you want me to update your "/root/. Read more

© unixetc.com 2012 - 2019
README