SSH Problem

Essage

Member
I used to log in on my server running OS X Server 10.1.4 with SSH. Worked perfectly. I have now upgraded (erase and install) the server to 10.2 and gets the following error when trying to connect.


[Xtephan:~] stephan% ssh admin@192.168.0.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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
21:4f:4f:d4:f3:e3:6d:d1:09:e5:34:17:10:d6:ae:7e.
Please contact your system administrator.
Add correct host key in /Users/stephan/.ssh/known_hosts to get rid of this message.
Offending key in /Users/stephan/.ssh/known_hosts:2
RSA host key for 192.168.0.2 has changed and you have requested strict checking.
Host key verification failed.
[Xtephan:~] stephan%


I opened the known_hosts-file, but didn't understand anything of what I should do.

What should i do to get it to work again?
 
Not a problem! With the new System, a new machine key was generated for ssh. If you selected "Keep old System" when you upgraded, then you have two options, otherwise you have one:

1) On your "From" machine use Terminal and go to the ~/.ssh folder. You'll find a file called known_hosts. You can either delete the whole file or edit the file in your favorite text editor and delete the line that refers to your "To" machine (your server).

OR...

2) If you kept your old System, do something like this, adjusting folder names as necessary:
Code:
% [b]sudo cp /Previous\ Systems/Previous\ System\ 1/etc/ssh_host* /etc/[/b]
That gives your new System the same ssh "identity" as the old one.

Cheers.

-Rob
 
Back
Top