Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting below exception when I tried to connect my linux box:

(testuser) testuser- ssh -X
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
Please contact your system administrator.
Add correct host key in /home/testuser/.ssh/known_hosts to get rid of this message.
Offending key in /home/testuser/.ssh/known_hosts:25
RSA host key for has changed and you have requested strict checking.
Host key verification failed.

I was able to connect to the same host earlier but I am getting this error now. Should I change anything in my known_hosts file so that I can connect to the Linux box.

share|improve this question

migrated from Apr 2 '13 at 17:47

This question came from our site for professional and enthusiast programmers.

Did somebody reinstall something on the linux box? If not, perhaps the linux box has moved to a different ip than the one you are connecting to? – Paul Tomblin Apr 2 '13 at 12:46
up vote 2 down vote accepted

Your linux box RSA key may have changed, one way or another. You should remove the offending line (line 25) in your /home/testuser/.ssh/known_hosts file and try reconnecting.

Please be cautious, it could be a vulnerability in your linux box or it may have changed IP.

share|improve this answer
Or you could be the victim of a MITM attack? – Mr47 Apr 2 '13 at 12:48

Remove the entry from Offending key in /home/testuser/.ssh/known_hosts at line #25 and then try to connect with SSH. It will ask for adding a new entry.

share|improve this answer

This is happened when you change hostname or IP address:

lets generate new key on server and on the client replace with line number 25 ( in your case)

[spatel@08 ~]$  ssh-keyscan -t rsa
# SSH-2.0-OpenSSH_4.3 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvwwfYRBLtHwuZWIxy9p/NrUFX+qAj9PJHTmwtGbLli1t1WfjXNCy3qWFVSEFaqnqPtvRbSgYYhipHCTrdRSNIzkQMC6y/ZszvNE/Ev4qN8MMRZyBxZV10swGX7WjPRe/MPBGe5Mu8CpmEI4ToQdDnyjwFcfIKOdocWZR6jW9FD3qFzVZFH55ayaDgerpB+hUhuSomtXNsrx6+dp+LS6770RtpWJ+mYCqeLlArIQylJ4k4FDuX+X7e2/TfReQ2ZCpRPpwnPWORuCsgaW3c1l8nUt1I0StLr5joyo0Dm6pzlJ/6qrhgBOygWGYiwZ9K1V8bQ3+WqU+856Ko3RmbRBpSQ==
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .