CentOS 配置無密碼登錄的實現(xiàn)
更新時間:2017年06月01日 10:55:00 作者:XuYuan
這篇文章主要介紹了CentOS 配置無密碼登錄的實現(xiàn)的相關資料,需要的朋友可以參考下
CentOS 配置無密碼登錄
配置sshd服務 在服務器上修改/etc/ssh/sshd_config:
<!-- lang: shell -->
#禁止root登錄 PermitRootLogin no #指定可以登錄的用戶 AllowUsers bob alice StrictModes yes #關閉密碼驗證 PasswordAuthentication no #打開RSA驗證相關設置 RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys #關閉 GSSAPI驗證 GSSAPIAuthentication no
重啟sshd服務
生成rsa-keypair 切換到允許ssh登錄的用戶賬戶執(zhí)行如下執(zhí)行如下命令:
<!-- lang: shell -->
#生成key-pair ssh-keygen cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys sudo chmod 600 ~/.ssh/authorized_keys sudo chmod 700 ~/.ssh restorecon -R -v ~/.ssh
復制剛剛生成的id_rsa文件到本地,一般命名為:server.pem
ssh -i server.pem username@server
感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
相關文章
Apache遇到的問題 APR not found問題的解決方法
checking for APR... no configure: error: APR not found . Please read the documentation2013-07-07詳解Linux系統(tǒng)中設置SFTP服務用戶目錄權限的方法
這篇文章主要給大家介紹了Linux系統(tǒng)中設置SFTP服務用戶目錄權限的方法,文中給出了詳細的設置方法,有需要的朋友們可以參考借鑒,下面來一起看看吧。2016-12-12虛擬機安裝Linux rhel7.3操作系統(tǒng)(具體步驟)
這篇文章主要介紹了虛擬機安裝Linux rhel7.3操作系統(tǒng)(具體步驟),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2019-10-10centos7修改系統(tǒng)語言為簡體中文的實現(xiàn)
這篇文章主要介紹了centos7修改系統(tǒng)語言為簡體中文的實現(xiàn),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-04-04