最近作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,看看是否是已經不須要密碼了。