无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Google Authenticator實(shí)現(xiàn)Linux用戶登錄雙認(rèn)證雙重認(rèn)證

2023-06-14 20:13 作者:movno1  | 我要投稿

1、安裝這個

yum install epel-release -y

或者

dnf epel-release -y

?

2、安裝這個

yum install google-authenticator -y

或者

dnf install google-authenticator -y

?

?

3、安裝這個(用于顯示二維碼)?????????????????????????????????????????????????????????????????????????

yum install qrencode-libs -y

?

4、運(yùn)行這個

google-authenticator

5、

5.1、添加谷歌身份驗(yàn)證器PAM模塊

在vi /etc/pam.d/sshd文件最后添加谷歌身份驗(yàn)證器PAM模塊配置:

auth required pam_google_authenticator.so

或使用如下命令在/etc/pam.d/sshd文件添加認(rèn)證模塊:

echo "auth required pam_google_authenticator.so" >>/etc/pam.d/sshd

5.2配置挑戰(zhàn)式密碼認(rèn)證

需要在這個目錄下面增加一下,否則登錄一直報(bào)錯,almalinux系統(tǒng)是這樣,其他系統(tǒng)暫時沒有測試。

sed -i 's/ChallengeResponseAuthentication no/ChallengeResponseAuthentication yes/g' /etc/ssh/sshd_config.d/50-redhat.conf

5.3

systemctl restart sshd


5.4下面兩個問題是解決,登錄的時候報(bào)錯(核心內(nèi)容)

主要是因?yàn)镾ELinux不允許寫入

sudo semanage fcontext -a -t ssh_home_t "/root/.google_authenticator"

sudo semanage fcontext -a -t ssh_home_t "/root"

?

sudo restorecon -v /root/.google_authenticator



下面2個是臨時設(shè)置權(quán)限,重啟后失效(不需要使用)

sudo chcon -t ssh_home_t /root/.google_authenticator

sudo chcon -t ssh_home_t /root


Google Authenticator實(shí)現(xiàn)Linux用戶登錄雙認(rèn)證雙重認(rèn)證的評論 (共 條)

分享到微博請遵守國家法律
杂多县| 芜湖县| 淮滨县| 札达县| 宜章县| 鄂伦春自治旗| 贵南县| 永春县| 新竹县| 崇信县| 乐亭县| 新安县| 略阳县| 清原| 泰兴市| 德钦县| 吉首市| 当雄县| 崇左市| 兴城市| 襄樊市| 无锡市| 达日县| 都兰县| 泸西县| 高尔夫| 阜宁县| 新和县| 房产| 财经| 沽源县| 区。| 西华县| 新乡市| 浏阳市| 湘乡市| 南康市| 平和县| 江北区| 大连市| 开阳县|