安装了三个节点,master,slave1,slave2
1.主节点免密匙登陆从节点
主机点窗口输入 ssh-keygen -t rsa 一路回车下去
2.然后输入
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
3.然后将authorized_keys发送到从节点slave1,slave2
scp authorized_keys [email protected]:~
scp authorized_keys [email protected]:~
4.从节点生成密匙按照第一个步骤
5.将authorized_keys移动到 .ssh目录下
修改权限
chmod 600 ~/.ssh/authorized_keys
6.从节点登陆主节点,以及从节点之间互相登陆
cd .ssh
ssh-copy-id -i id_rsa.pub [email protected];
输入此命令即可
原文地址:http://blog.51cto.com/10314260/2062278
时间: 2024-10-12 20:31:54