现192.168.0.111 需要登录 192.168.0.112
在111上:
master生成密钥
ssh-keygen -t rsa
拷贝到slave
scp /root/.ssh/id_rsa.pub root@192.168.0.112:/root/.ssh/authorized_keys
测试登录slave
ssh root@192.168.0.112
cat ~/.ssh/id_*.pub | ssh root@node1 'cat >> .ssh/authorized_keys'
cat ~/.ssh/id_*.pub | ssh root@node2 'cat >> .ssh/authorized_keys'
cat ~/.ssh/id_*.pub | ssh root@node3 'cat >> .ssh/authorized_keys'