天天看點

ssh/ssh2登入

<b></b>

<b>SSH2登入:</b>

<b>現在确認能否不輸入密碼就用ssh登入localhost:</b>

<b>$ ssh localhost</b>

<b>如果不輸入密碼就無法用ssh登陸localhost,執行下面的指令:</b>

<b>$ cd ~/.ssh2</b>

<b>$ ssh-keygen2 -t rsa </b>

<b>$ echo "IdKey id_rsa_2048_a" &gt; identification</b>

<b>$ echo "key id_rsa_2048_a.pub" &gt; authorization </b>

<b> </b>

<b>SSH登入:</b>

<b>$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa</b>

<b>$ cat ~/.ssh/id_dsa.pub &gt;&gt; ~/.ssh/authorized_keys</b>

繼續閱讀