Question

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

Posted May 13, 2021 1.1k views
MiscellaneousUser Experience

I was doing the same I always do to enrol myself in my university classes. It’s an ssh user@server program, what ever that means. Then from one day to another I received this error:
“User:~ user$ ssh server
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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:WsK15iIwIHek0BOwQ7ofG9iayZrXBgRXWMQURSaxUAY.
Please contact your system administrator.
Add correct host key in /Users/$USER/.ssh/knownhosts to get rid of this message.
Offending RSA key in /Users/$USER/.ssh/known
hosts:1
RSA host key for rumad.uprm.edu has changed and you have requested strict checking.
Host key verification failed.”

I don’t know what happened. I don’t even use Terminal for nothing else. If you can help me it would be amazing. Thank you

edited by alexdo

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello, @jeremymorales1

Have you made any changes like generating new ssh keys and etc?

You can edit the file and remove line 1 as per the message.

  • nano +1 /Users/USER/.ssh/knownhosts

Then just delete the first line in the file and save the file then exit.

Offending RSA key in /Users/$USER/.ssh/known_hosts:1

You can also use ssh-keygen to delete the invalid key

ssh-keygen -R "you server hostname or IP address"

Hope that this helps!
Regards,
Alex