0

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

(testuser) testuser- ssh -X [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
b7:f9:rb:9s:bb:e3:f1:90:4b:af:88:77:1a:da:cf:1c.
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 hostname.com 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.

1
  • 2
    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? Apr 2, 2013 at 12:46

3 Answers 3

2

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.

1
  • 2
    Or you could be the victim of a MITM attack?
    – Mr47
    Apr 2, 2013 at 12:48
0

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.

0

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 10.10.20.8
# 10.10.20.8 SSH-2.0-OpenSSH_4.3
10.10.20.8 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvwwfYRBLtHwuZWIxy9p/NrUFX+qAj9PJHTmwtGbLli1t1WfjXNCy3qWFVSEFaqnqPtvRbSgYYhipHCTrdRSNIzkQMC6y/ZszvNE/Ev4qN8MMRZyBxZV10swGX7WjPRe/MPBGe5Mu8CpmEI4ToQdDnyjwFcfIKOdocWZR6jW9FD3qFzVZFH55ayaDgerpB+hUhuSomtXNsrx6+dp+LS6770RtpWJ+mYCqeLlArIQylJ4k4FDuX+X7e2/TfReQ2ZCpRPpwnPWORuCsgaW3c1l8nUt1I0StLr5joyo0Dm6pzlJ/6qrhgBOygWGYiwZ9K1V8bQ3+WqU+856Ko3RmbRBpSQ==

You must log in to answer this question.

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