I encountered the same problem with him.
ssh
-i <your_keypair> root@<your_host> I tried this but it wasn't solved.
Here's my solution
host1 ip:192.168.1.21
host2 ip:192.168.1.22
host3 ip:192.168.1.23
on host1:
rm -rf /root/.ssh
ssh-keygen -t dsa
cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
scp /root/.ssh/id_dsa.pub host2:/root/
scp /root/.ssh/id_dsa.pub host3:/root/
on host2:
rm -rf /root/.ssh
ssh-keygen -t dsa
cat /root/id_dsa.pub >> /root/.ssh/authorized_keys
on host3:
rm -rf /root/.ssh
ssh-keygen -t dsa
cat /root/id_dsa.pub >> /root/.ssh/authorized_keys
host1:/root/.ssh/id_dsa This's the file which you need.
Ambari SSH密钥配置

本文介绍了解决Ambari集群中SSH连接问题的方法,通过在各主机上配置DSA类型的SSH密钥实现免密码登录,包括密钥的生成、分发及authorized_keys文件的更新。
3541

被折叠的 条评论
为什么被折叠?



