[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to get new RSA key in known_hosts file?



On 25/05/12 13:24, Marc Shapiro wrote:
> I recently had to reinstall Squeeze on my desktop box due to hard disk
> issues.  On reinstalling OpenSSH a new key was generated.  Now, when I
> try to connect from my laptop I get the following message:
> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @    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
> cb:fa:a3:10:3d:01:c0:e6:6a:2d:3e:59:e1:b9:4e:b8.
> Please contact your system administrator.
> Add correct host key in /home/marc/.ssh/known_hosts to get rid of this message.
> Offending key in /home/marc/.ssh/known_hosts:1
> RSA host key for xander has changed and you have requested strict checking.
> Host key verification failed.
> 
> 
> 
> Googling for how to update my known_hosts file turned up this suggestion:
> 
> ssh -o StrictHostKeyChecking=no yourserver
> 
> I tried this (obviously replacing "yourserver" with the name of my
> desktop box to which I am trying to connect).  This resulted in the
> following, similar, but not quite the same message:
> 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @    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
> cb:fa:a3:10:3d:01:c0:e6:6a:2d:3e:59:e1:b9:4e:b8.
> Please contact your system administrator.
> Add correct host key in /home/marc/.ssh/known_hosts to get rid of this message.
> Offending key in /home/marc/.ssh/known_hosts:1


<snipped>

> 
> How do I manually enter the rsa key, or get ssh to do so, so that  I
> can connect again?
> 
> Marc
> 
> 


$ nano .ssh/known_hosts
and delete the first line (they're numbered starting with 1).

That's it.



Kind regards

-- 
Iceweasel/Firefox/Chrome/Chromium/Iceape/IE extensions for finding
answers to questions about Debian:-
https://addons.mozilla.org/en-US/firefox/collections/Scott_Ferguson/debian/


Reply to: