解决WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Posted raodi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!相关的知识,希望对你有一定的参考价值。

问题:

  当我想要利用win10本地的cmd进行:

ssh root@192.168.1.230

  时,出现了如下错误:

技术图片
C:UsersRaodi>ssh root@192.168.1.230
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
SHA256:M+I2wvuU9NkNuky0XSWsdqS2N8+2sFUb8H66BxhTVtQ.
Please contact your system administrator.
Add correct host key in C:UsersRaodi/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:UsersRaodi/.ssh/known_hosts:4
RSA host key for 192.168.1.230 has changed and you have requested strict checking.
Host key verification failed.
错误

技术图片

 

 

 解决办法:

  1、找到用户目录下的.ssh目录,如:C:UsersRaodi.ssh   。在该目录下有一个known_hosts文件,专门记录ssh过程中匹配的秘钥。

技术图片

  2、编辑该文件,删除以ip开头的整行内容,保存并退出。并重新连接即可。

技术图片

 

以上是关于解决WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!的主要内容,如果未能解决你的问题,请参考以下文章

scp报错“WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”解决方法

SSH连接时出现「WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!」解决办法

Linux SSH 远程登录错误及解决办法 WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! --主机密钥验证失败