爲了讓在A上可以無密碼SSH到B上
首先在A上執行ssh-keygen -t rsa
一路回車
將公鑰導入到authorized_keys文件中
cat ~/.ssh/rsa_id.pub >> authorized_keys
修改文件和文件夾權限
chmod 600 authorized_keys
chmod 700 ~/.ssh
將authorized_keys分發到遠程主機
scp ~/.ssh/authorized_keys [email protected]:/home/meteor/.ssh
現在就可以無密碼登錄了。