Debian 使用 Google Authenticator 登入 SSH

本文阅读 1 分钟
首页 Debian 正文

首先安裝 Google Authenticator

apt install libpam-google-authenticator -y

接著執行 Google Authenticator

google-authenticator

過程中,都只要按下 y 下一步就可以

接著設定 /etc/pam.d/sshd
將 @include common-auth 註解掉,之後在下方插入以下代碼:

auth required pam_google_authenticator.so

接著修改 /etc/ssh/sshd_config

ChallengeResponseAuthentication yes

最後重啟 ssh

/etc/init.d/ssh restart
本文来自投稿,不代表本站立场,如若转载,请注明出处:
Debian 10 + Bind9 9.16.3 編譯安裝
« 上一篇 06-17
關閉 Debian/Ubuntu 使用 Ctrl + Alt + Del 來重啟
下一篇 » 01-13

相关推荐