Ambari学习19_ssh 公钥认证报错:Permission denied (publickey,gssapi-keyex,gssapi-with-mic).解决2

来源:互联网 发布:六十甲子单双计算法 编辑:程序博客网 时间:2024/06/05 04:11

在Ambari学习6中,我们介绍了一种解决这个问题的方法,但是,后来又出现了新的问题,经常查找资料,最终找到解决方案:




down voteaccepted

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/.sshssh-keygen -t dsacat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keysscp /root/.ssh/id_dsa.pub host2:/root/scp /root/.ssh/id_dsa.pub host3:/root/

on host2:

rm -rf /root/.sshssh-keygen -t dsacat /root/id_dsa.pub >> /root/.ssh/authorized_keys

on host3:

rm -rf /root/.sshssh-keygen -t dsacat /root/id_dsa.pub >> /root/.ssh/authorized_keys

host1:/root/.ssh/id_dsa This's the file which you need.

过程如上,主要区别是:ssh-keygen -t dsa;

即dsa和rsa的区别。


参考资料:

http://stackoverflow.com/questions/31010016/permission-denied-publickey-gssapi-keyex-gssapi-with-mic-password-during-ambar


0 0
原创粉丝点击