How to Remove Unwanted SSH Keys


After re-install my Synology DSM, I cannot use ssh to login DSM. It prompts for following warning message:

Last login: Thu Jun 16 10:11:39 on console
Amigos-Mac-mini:~ Amigo$ ssh admin@192.168.1.142
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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:cq9E1KQyJ5Nq3ktPpZ/K1GFydg741lEZKQ3DJxF2DJA.
Please contact your system administrator.
Add correct host key in /Users/Amigo/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/Amigo/.ssh/known_hosts:1
ECDSA host key for 192.168.1.142 has changed and you have requested strict checking.
Host key verification failed.
Amigos-Mac-mini:~ Amigo$ 

In short, I have to remove my previous key. It’s saved in different location with different tools.

Continue reading