MAC终端 ECDSA host key for [xx xx xx xx] xxxx has changed

终端登陆SSH

1
ssh root@xx.xx.xx.xx -p xxxx

登陆异常 抛错

1
2
3
4
5
Add correct host key in /Users/jocelen/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /Users/jocelen/.ssh/known_hosts:2

ECDSA host key for [xx.xx.xx.xx]:xxxx has changed and you have requested strict checking.

解决办法

原因:两次ssh连接的秘钥不匹配,处理:删除报错路径下 /Users/jocelen/.ssh/known_hosts:2 文件即

0%