使用ssh连接centos出现密钥错误的解决方法

来源:互联网 发布:数据库表格模板 编辑:程序博客网 时间:2024/06/05 18:56
这几天配置分布式spark环境,在mac os配置master,在centos 6.5下配置slave,通过ssh免密钥访问,虚拟机挂掉一次再开启网络服务时出现了问题,mac无法访问。参考如下链接解决了这个问题:
http://stackoverflow.com/questions/20840012/ssh-remote-host-identification-has-changed
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!Someone could be eavesdropping on you right now (man-in-the-middle attack)!It is also possible that a host key has just been changed.The fingerprint for the RSA key sent by the remote host is6e:45:f9:a8:af:38:3d:a1:a5:c7:76:1d:02:f8:77:00.Please contact your system administrator.Add correct host key in /home/hostname /.ssh/known_hosts to get rid of this message.Offending RSA key in /var/lib/sss/pubconf/known_hosts:4RSA host key for pong has changed and you have requested strict checking.Host key verification failed.

在mac终端中输入如下命令:

ssh-keygen -R <host>

例如,我的虚拟机IP是192.168.10.134,那么命令就是:

ssh-keygen -R 192.168.10.134

0 0
原创粉丝点击