SSH warns “it is possible that someone is doing something nasty!”

By | May 20, 2009

Let this be a warning to all: SSH knows what you’re doing and SSH is not pleased.

Innuendos aside, I got this nice little error trying to SSH into my brand new server at home. And by “brand new”, I mean it’s my wife’s old desktop that is now running Ubuntu Server 9.04.

[text]
$ ssh myserver
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
95:00:83:54:de:45:f1:g3:45:34:be:88:98:42:e2:c8.
Please contact your system administrator.
Add correct host key in /home/ashlux/.ssh/known_hosts to get rid of this message.
Offending key in /home/ashlux/.ssh/known_hosts:2
RSA host key for myserver has changed and you have requested strict checking.
Host key verification failed
[/text]

So how did this happen? Basically, I used to have my router setup to forward the SSH port to my computer. Basically my computer at work had the RSA key for my computer, not the new server.

Contrary to the tidbit about requesting “strict checking”, using the -o stricthostkeychecking=no gave the same result.

Luckily the error message gave me one big hint as to how to fix this: “Offending key in /home/ashlux/.ssh/known_hosts:2″. The solution was simple enough, just delete the second line of the known_hosts.

SSH is working again. *cheers*

Leave a Reply

Your email address will not be published. Required fields are marked *