bryanbocao / awesome-cmd-cheatsheets

Quick search the commands you need.
3 stars 1 forks source link

REMOTE HOST IDENTIFICATION HAS CHANGED #1

Closed bryanbocao closed 2 years ago

bryanbocao commented 2 years ago
$ ssh <user>@<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 ECDSA key sent by the remote host is
<ECDSA_key>.
Please contact your system administrator.
Add correct host key in <user_dir>/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in <user_dir>/.ssh/known_hosts:10
ECDSA host key for <ip> has changed and you have requested strict checking.
Host key verification failed.
bryanbocao commented 2 years ago

Solution:

$ ssh-keygen -R <ip>
# Host <ip> found: line 10
<user_dir>/.ssh/known_hosts updated.
Original contents retained as <user_dir>/.ssh/known_hosts.old

Reference