在CMD窗口中利用SSH连接远程服务器

ssh 远程用户名@远程ip地址

出现的错误:WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

C:\Users\本地用户名>ssh 远程用户名@远程ip地址
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:\\Users\\本地用户名/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\\Users\\本地用户名/.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:\Users\本地用户名\.ssh 。在该目录下有一个known_hosts文件,专门记录ssh过程中匹配的秘钥。
  2. 编辑该文件,删除以不能连接的IP开头的整行内容,保存并退出。
  3. 重新连接即可。

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2021-04-29
  • 2021-07-06
  • 2021-11-29
  • 2022-12-23
  • 2021-10-08
  • 2021-10-10
猜你喜欢
  • 2022-12-23
  • 2021-08-29
  • 2022-01-11
  • 2021-11-22
  • 2022-01-05
  • 2021-06-29
相关资源
相似解决方案