VPS重装系统之后key发生变更SSH连接报错:
WARNING: 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 is
da:d5:2b:9a:f3:be:29:99:88:02:3a:2a:27:aa:19:46.
Please contact your system administrator.
Add correct host key in /Users/chuan/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/chuan/.ssh/known_hosts:8
RSA host key for xxx.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.

解决方法一:
直接删除本地ssh连接记录的key信息,运行
cd ~/.ssh/
rm ~/.ssh/known_hosts

解决方法二:
进入known_hosts删除对应vps之前记录的key
cd ~/.ssh/
vi known_hosts
i编辑删除
按下esc键输入:x保存退出

发表评论

电子邮件地址不会被公开。 必填项已用*标注