Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon May 14, 2007 2:09 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
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


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 2:14 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Edit your ~/.ssh/known_hosts file and remove the offending line that contains that machine's IP address or hostname.

-Chris


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 2:19 pm 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
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/known_hosts (~/.ssh/known_hosts) 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/known_hosts:3" suggests that the old host key is on line 3 of known_hosts.


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 3:11 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
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.


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 3:26 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
The entry from known_hosts needs to be removed on the machine you're SSHing from, to to.


Top
   
 Post subject:
PostPosted: Mon May 14, 2007 3:33 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hello,

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


Top
   
 Post subject:
PostPosted: Wed May 16, 2007 9:23 am 
Offline
Senior Member

Joined: Fri Feb 13, 2004 11:30 am
Posts: 140
Location: England, UK
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


Top
   
 Post subject:
PostPosted: Wed May 16, 2007 4:04 pm 
Offline
Senior Member
User avatar

Joined: Sun Feb 08, 2004 7:18 pm
Posts: 562
Location: Austin
Yes, good point. We got caught up in providing the "fix" and never mentioned the real purpose of the thing!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group