Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed a new server but now I'm not able to ssh into the server from my Ubuntu 9.04 machine. I get the following error

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Please contact your system administrator.
Add correct host key in /home/myname/.ssh/known_hosts to get rid of this message.
Offending key in /home/myname/.ssh/known_hosts:29
RSA host key for 10.x.x.1 has changed and you have requested strict checking.
Host key verification failed.

I have never experienced a problem like this before

share|improve this question

3 Answers 3

up vote 2 down vote accepted

It seems like the machine RSA security key has been compromised or changed, which is normally the case with a new installation. On your local machine you need to remove this machine from the known_hosts file and then try and connect. This should ask you to generate a new SSH key.

You can use vi to edit the file directly.

vi /home/myname/.ssh/known_hosts

share|improve this answer

The SSH key has changed on your server, and that is why your SSH client is prompting you about this potential risk, as well as not allowing you to connect.

Did you reinstall the machine or SSH on the server lately? Or did you regenerate the SSH password? Could it really be someone has hacked in? Well doesn't matter, the first thing you need to do is to access the machine first before you can find out more.

To do that, you will need to go to the client, and remove the known_hosts file.

rm ~/.ssh/known_hosts

It should be okay to do so, and the next time you connect, the client will regenerate a new known_hosts file.

share|improve this answer
    
If you have a huge list of known_hosts deleting it will require everyone to be regenerated, and is not entirely ideal every time. Editing is simpler - Sometimes –  Diago Sep 8 '09 at 8:31
    
@Diago : true, i'm the lazy man who just let everything regenerate once in awhile. :) –  caliban Sep 8 '09 at 8:36

Did you try do what message assumes? Try to remove old server record from /home/myname/.ssh/known_host at line 29.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.