服務(wù)器二次登錄驗(yàn)證:
站在用戶的角度思考問題,與客戶深入溝通,找到樂安網(wǎng)站設(shè)計(jì)與樂安網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶體驗(yàn)好的作品,建站類型包括:成都網(wǎng)站制作、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、申請(qǐng)域名、雅安服務(wù)器托管、企業(yè)郵箱。業(yè)務(wù)覆蓋樂安地區(qū)。
目前比較流行的兩種方式
1 Google
https://github.com/google/google-authenticator
安裝 關(guān)閉 selinux git clone https://github.com/google/google-authenticator.git yum install libtool ./bootstrap.sh ./configure make && make install google-authenticator 獲取私鑰 客戶端輸入。 Do you want me to update your "/root/.google_authenticator" file (y/n) y Do you want to disallow multiple uses of the same authenticationtoken? This restricts you to one login about every 30s, but it increasesyour chances to notice or even prevent man-in-the-middle attacks (y/n) Do you want to disallow multiple uses of the same authenticationtoken? This restricts you to one login about every 30s, but it increasesyour chances to notice or even prevent man-in-the-middle attacks (y/n) y By default, tokens are good for 30 seconds. In order to compensate forpossible time-skew between the client and the server, we allow an extratoken before and after the current time. If you experience problems withpoor time synchronization, you can increase the window from its defaultsize of +-1min (window size of 3) to about +-4min (window size of17 acceptable tokens).Do you want to do so? (y/n) y If the computer that you are logging into isn't hardened against brute-forcelogin attempts, you can enable rate-limiting for the authentication module.By default, this limits attackers to no more than 3 login attempts every 30s.Do you want to enable rate-limiting (y/n) y vim /etc/pam.d/sshd 第一行添加 auth required pam_google_authenticator.so vim /etc/ssh/sshd_config 修改為 ChallengeResponseAuthentication yes service sshd restart ln -s /usr/local/lib/security/pam_google_authenticator.so pam_google_authenticator.so
通過 私鑰+時(shí)間戳 算出6位驗(yàn)證碼,客戶端和服務(wù)端匹配,則通過驗(yàn)證。
缺點(diǎn):數(shù)據(jù)明文存儲(chǔ)本地,root賬號(hào)可以看到
應(yīng)用商店搜索 Google身份驗(yàn)證器 安裝
2 洋蔥
https://github.com/secken/secken-ssh
git clone https://github.com/secken/secken-ssh.git
sh dep.sh
tips
將keyboard interactive 放到第一位
通過秘鑰登錄的 無法進(jìn)行二次驗(yàn)證
參考:http://36kr.com/p/532998.html
http://www.xitongzhijia.net/xtjc/20141211/32369.html
網(wǎng)站名稱:二次登陸驗(yàn)證
標(biāo)題路徑:http://jinyejixie.com/article4/gpeioe.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、用戶體驗(yàn)、外貿(mào)建站、網(wǎng)頁設(shè)計(jì)公司、企業(yè)建站、全網(wǎng)營(yíng)銷推廣
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)