您的位置:首页 > Web前端

Fix "the ECDSA host key for 'your server' differs from the key for the IP address 'the ip'"

2017-05-12 13:13 811 查看
Cause: the change of remote git address

Platform:MAC

Warning Info:

Warning: the ECDSA host key for 'xx.xxx.com' differs from the key for the IP address 'xx.xx.xx.xx'
Offending key for IP in /Users/username/.ssh/known_hosts2:2


Solution:

1)
cd ~/.ssh


2)
vim config


3) Then edit this config file:

Host xx.xxx.com
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
LogLevel=quiet


4)
:wq


Reference:

https://serverfault.com/questions/423019/known-hosts-ecdsa-host-key-multiple-domains-on-one-ip

http://blog.csdn.net/zhangp80/article/details/6889568

http://stackoverflow.com/questions/9299651/git-says-warning-permanently-added-to-the-list-of-known-hosts

In summary

This solution really save my day!

Also you can try this way : “ssh-keygen -R <yourhostname>”

Windows platform may refer to this workaround as well.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐