REMOTE HOST IDENTIFICATION HAS CHANGED

Hello,

Thanks for the answer to my previous post. This was helpful.

I deleted the configuration profiles and disk image related to my fedora core 6 distribution and installed the CentOS one instead. When I try to ssh, I get the error 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

d4:3b:0b:61:dd:d7:b7:bc:a9:5d:b0…..

Please contact your system administrator.

Add correct host key in /Users/MYNAME/.ssh/known_hosts to get rid of this message.

Offending key in /Users/MYNAME/.ssh/known_hosts:3

RSA host key for MYIP has changed and you have requested strict checking.

Host key verification failed.

(I replaced real names with MYNAME and real ip with MYIP and deleted part of the RSA key)

Any idea why this is happening and what I should do to be able to ssh into my system.

Many thanks

7 Replies

Edit your ~/.ssh/known_hosts file and remove the offending line that contains that machine's IP address or hostname.

-Chris

The RSA host key will change when you reinstall a system from scratch, such as removing the Fedore Core disk (and all related disk images) and installing CentOS.

Just edit the file /Users/MYNAME/.ssh/knownhosts (~/.ssh/knownhosts) on your local computer using your favorite text editor (nano, vi/vim, whatever) and delete the line that begins with MYIP (your Linode's IP address).

The error "Offending key in /Users/MYNAME/.ssh/knownhosts:3" suggests that the old host key is on line 3 of knownhosts.

Hello,

The problem is to reach that file. Since ssh does not work, I tried Remote Console Access with Lish (Linode Shell). I can login. But I cannot find the folder /Users:

[root@liXX-XXX /]# ls -al

total 212

drwxr-xr-x 23 root root 4096 May 14 15:04 .

drwxr-xr-x 23 root root 4096 May 14 15:04 ..

-rw-r–r-- 1 root root 0 May 14 15:04 .autofsck

drwxr-xr-x 2 root root 4096 Mar 14 2005 bin

drwxr-xr-x 2 root root 4096 Mar 14 2005 boot

drwxr-xr-x 23 root root 118784 May 14 15:04 dev

drwxr-xr-x 53 root root 4096 May 14 15:04 etc

drwxr-xr-x 2 root root 4096 Feb 21 2005 home

drwxr-xr-x 2 root root 4096 Feb 21 2005 initrd

drwxr-xr-x 11 root root 4096 Mar 14 2005 lib

drwx------ 2 root root 16384 May 3 2003 lost+found

drwxr-xr-x 2 root root 4096 Feb 21 2005 media

drwxr-xr-x 2 root root 4096 Feb 21 2005 misc

drwxr-xr-x 2 root root 4096 Feb 21 2005 mnt

drwxr-xr-x 2 root root 4096 Feb 21 2005 opt

dr-xr-xr-x 43 root root 0 May 14 15:03 proc

drwxr-x--- 2 root root 4096 May 14 15:07 root

drwxr-xr-x 2 root root 4096 Mar 14 2005 sbin

drwxr-xr-x 2 root root 4096 Feb 21 2005 selinux

drwxr-xr-x 2 root root 4096 Feb 21 2005 srv

drwxr-xr-x 10 root root 0 May 14 15:03 sys

drwxrwxrwt 4 root root 4096 May 14 15:04 tmp

drwxr-xr-x 14 root root 4096 Mar 14 2005 usr

drwxr-xr-x 20 root root 4096 Mar 14 2005 var

I am not sure what to do here.

The entry from known_hosts needs to be removed on the machine you're SSHing from, to to.

Hello,

I am feeling pretty dummy on that one! It works very well now. Thank you too all

:oops:

For the record, if you ever get this message and you haven't reinstalled or asked SSH to generate a new host key, don't connect. If you have reinstalled or done a new host key, it's perfectly safe to remove the entry, but not if it comes up without warning. :D

Yes, good point. We got caught up in providing the "fix" and never mentioned the real purpose of the thing!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct