使用RSA密鑰登入centos系統

來源:互聯網
上載者:User

為了系統centos的安全利用ssh RSA認證模式登入系統,windows系統利用secureCRT產生公開金鑰和私密金鑰,把公開金鑰上傳到伺服器使用者目錄/ROOT/.ssh目錄下。

[root@localhost ~]# mkdir .ssh//建立隱藏目錄.ssh

[root@localhost ~]# chmod 700 .ssh//改變許可權主為讀寫執行許可權,其它組或其它沒有許可權。

[root@localhost ~]# ssh-keygen -X -f Identity.pub >> /root/.ssh/authorized_keys

[root@localhost ~]# cd .ssh

[root@localhost .ssh]# ls

authorized_keys

[root@localhost .ssh]# cat /etc/ssh/sshd_config//查看openssh的設定檔

Protocol 2

SyslogFacility AUTHPRIV

PasswordAuthentication no//修改關閉/etc/passwd認證模式因為現在用的是RSA認證。

ChallengeResponseAuthentication no

GSSAPIAuthentication no

GSSAPICleanupCredentials yes

UsePAM no

AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES

AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT

AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE

AcceptEnv XMODIFIERS

X11Forwarding yes

Subsystem       sftp    /usr/libexec/openssh/sftp-server

windows平台利用secureCRT產生RSA

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.