A免密登录B
A机器:
ssh-keygen
一路回车,直到结束。
ssh-copy-id -i ~/.ssh/id_rsa.pub root@B机器IP地址
输入密码,完成。
测试登录:
ssh B机器IP地址
登录成功,不需要输入密码。