解决Host key verification failed.

ssh-keygen -R 你要访问的IP地址

例如

ssh-keygen -R 47.100.251.70

起因:

✘ liwei@MacBook-Pro  ~  ssh [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:UTPF6/wUyt6Xe13dUxi03MBYwmIq54Fz4tIxdN3U91g.
Please contact your system administrator.
Add correct host key in /Users/liwei/.ssh/known_hosts to get rid of this message.
Offending RSA key in /Users/liwei/.ssh/known_hosts:6
RSA host key for 47.100.251.70 has changed and you have requested strict checking.
Host key verification failed.

ssh-keygen -R 47.100.251.70
# Host 47.100.251.70 found: line 6
/Users/liwei/.ssh/known_hosts updated.
Original contents retained as /Users/liwei/.ssh/known_hosts.old

ok

你可能感兴趣的:(Linux)