ssh login error fix solution:ECDSA host key for xxx has changed and you have

ssh login error:ECDSA host key for xxx has changed and you have 

 

$ ssh ec2-user@ec2-192-168-1-1.compute-1.amazonaws.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:hotsxb/qVi1/ycUU2wXF6mfGH++Yk7WYZv0r+tIhg4I.
Please contact your system administrator.
Add correct host key in /Users/scott/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/scott/.ssh/known_hosts:12
ECDSA host key for ec2-192-168-1-1.compute-1.amazonaws.com has changed and you have requested strict checking.
Host key verification failed.


Linux fix solution:
 

mkdir -p ~/.ssh
echo 'Host *
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null'>~/.ssh/config


Windows fix solution:

md C:\Users\yourcurrentuser\.ssh
echo 'Host *
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null'>C:\Users\yourcurrentuser\.ssh\config

 

相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页