天天看点

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>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>

<b>    本文转自eyjian 51CTO博客,原文链接:http://blog.51cto.com/mooon/909444,如需转载请自行联系原作者</b>

继续阅读