markdown 为SSH设置Google身份验证器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 为SSH设置Google身份验证器相关的知识,希望对你有一定的参考价值。
# README
## Install the PAM module
```
sudo apt install libpam-google-authenticator
```
Enable google-authenticator for your sessions:
```
google-authenticator
```
Save securely your backup password.
## Enable two-factor authentication in SSH
Edit `/etc/pam.d/sshd` by adding the following line above `@include common-auth`
```
auth sufficient pam_google_authenticator.so
```
Edit `/etc/ssh/sshd_config` by modifying the following options:
```
PubkeyAuthentication yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes
AuthenticationMethods publickey,keyboard-interactive password,keyboard-interactive
UsePAM yes
```
以上是关于markdown 为SSH设置Google身份验证器的主要内容,如果未能解决你的问题,请参考以下文章
使用Google身份验证进行ssh二次验证
使用Google身份验证进行ssh二次验证
使用 Google API 的身份验证范围不足错误
Google People API:请求具有无效的身份验证凭据 - 未设置授权承载标头
使用Google Authenticator给ssh进行登录验证
Centos6.5SSH登录使用google二次验证