最近作ssh2密码登陆,方法记录一下,方便之后查阅:服务器
在服务器A上操做:ssh # ssh-keygen2 -t rsa ide # cd ~./ssh2spa # echo "IdKey id_rsa_2048_a" > identificationci # cp id_rsa_2048_a.pub testssh2.pubit 在服务器B上操做:io # cd ~/.ssh2table 将服务器a上的testssh2.pub,拿到服务器B的~/.ssh2目录下class # echo "key testssh2.pub" >> authorizationtest |
到此,免密码登陆就操做完毕了。
你能够在服务器A上,尝试去ssh一下服务器B,看看是否是已经不须要密码了。