Daichong'blog

[命令行报错提示]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@ 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 ECDSA key sent by the remote host is

SHA256:Qv4XPuXFuO1G8s0teCXRANvVnZy1jjIFKkp8yfJgLeA.

Please contact your system administrator.

Add correct host key in /c/Users/Administrator/.ssh/known_hosts to get rid of this message.

Offending ECDSA key in /c/Users/Administrator/.ssh/known_hosts:3

ECDSA host key for 58.87.72.33 has changed and you have requested strict checking.

Host key verification failed.

对于一个小白来说,这个是完全看不懂的,下面就告诉大家如何解决这个问题。

首先用ssh第一次连接sever,sever会生成一个公钥和一个私钥,私钥存在连接方的本地,系统重装后sever会重新生成一个公钥,然后连接方的私钥已经和sever的公钥不匹配,导致报错无法登录。

解决方法:

ssh-keygen -R xx.xx.xx.xx 后面跟ip即可删除指定服务器的公钥文件,再次连接时重新生成,并覆盖掉连接方的私钥。

duration: "6000", fade: "2500" }); } else { $.backstretch( ["/image/bg.jpg"], { duration: "6000", fade: "2500" }); } });