known_hosts beherbergt einen falschen Hostkey

Folgende Fehlermeldung lachte mich auf meinem Mac an, als ich eine SSH Verbindung zu einen der Systeme aufbauen wollte.
Das war für eigentlich in Ordnung, schließlich war die Netzwerkkarte ersetzt worden.


@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:IXvfGp6xXGoNkczVTUEXXXXXXXXXXXXXXXXXXXXXX.
Please contact your system administrator.
Add correct host key in /Users/aro/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /Users/aro/.ssh/known_hosts:85
Password authentication is disabled to avoid man-in-the-middle attacks.
Keyboard-interactive authentication is disabled to avoid man-in-the-middle attacks.
UpdateHostkeys is disabled because the host key is not trusted.
root@10.xxx.xxx.xxx: Permission denied (password,keyboard-interactive,publickey).

Eine Verbindung kommt bei der Meldung aber nicht zu Stande. Also was tun?
Der falsche Hostkey muss aus der known_hosts entfernt werden.


Im Fall von Windows und der Verwendung von PuttY stehen diese Schlüssel im Übrigen in der Registry.

HKEY_CURRENT_USER/Software/SimonTatham/PuTTY/SshHostKeys/

Unter Linux und auf dem Mac hilft folgender Befehl
ssh-keygen -R IP-Adresse => Beispiel: ssh-keygen -R 192.168.2.1

admin has written 158 articles