1、登录任意节点home目录,创建公私有密钥
执行:ssh-keygen
cd ~/.ssh
ls
2、上传公钥到需要免密登录的节点
比如:172.16.154.10 172.16.154.13 等等,root用户
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
3、测试免密登录
成功登录,说明ok了,一般是不会出问题的。