Solaris ssh配置主機間信任關係

來源:互聯網
上載者:User

標籤:style   blog   color   os   io   for   ar   cti   

假設需要配置從主機com00biiitf001登入主機ols00biiitf001時不要求輸入密碼,則採用以下步驟配置:

  • com00biiitf001上產生公用/私人金鑰組

$ ssh-keygen -t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/export/home/jyu/.ssh/id_rsa):Created directory ‘/export/home/jyu/.ssh‘.Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /export/home/jyu/.ssh/id_rsa.Your public key has been saved in /export/home/jyu/.ssh/id_rsa.pub.The key fingerprint is:b0:89:f6:e5:4c:43:f1:9b:c4:ac:a7:d8:1d:98:67:4d [email protected]

  • 在ols00biiitf001上建立.ssh目錄
$ mkdir -p $HOME/.ssh$ chmod 700 $HOME/.ssh$ touch $HOME/.ssh/authorized_keys$ chmod 600 $HOME/.ssh/authorized_keys
  • 把com00biiitf001的公開金鑰傳到ols00biiitf001上
$ cat $HOME/.ssh/id_rsa.pub | ssh ols00biiitf001 ‘cat >> .ssh/authorized_keys && echo "Key uploaded successfully"‘The authenticity of host ‘ols00biiitf001 (10.0.17.20)‘ can‘t be established.RSA key fingerprint is 96:f2:60:e1:22:c8:54:ad:35:9c:3e:d1:51:a0:73:79.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added ‘ols00biiitf001,10.0.17.20‘ (RSA) to the list of known hosts.|-----------------------------------------------------------------|| This system is for the use of authorized users only.            || Individuals using this computer system without authority, or in || excess of their authority, are subject to having all of their   || activities on this system monitored and recorded by system      || personnel.                                                      ||                                                                 || In the course of monitoring individuals improperly using this   || system, or in the course of system maintenance, the activities  || of authorized users may also be monitored.                      ||                                                                 || Anyone using this system expressly consents to such monitoring  || and is advised that if such monitoring reveals possible         || evidence of criminal activity, system personnel may provide the || evidence of such monitoring to law enforcement officials.       ||-----------------------------------------------------------------|Password:Key uploaded successfully
  • 現在就可以從com00biiitf001直接登入到ols00biiitf001上
$ ssh [email protected]

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.