954,242 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

SSH Problem - Networking

Hello all,

I have am having problems with ssh after a new OS install on a remote server. I am now unable to connect to the remote server via ssh becuase of 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
e4:00:85:b2:5b (I deleted a section from this value before posting).
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for <remote-server-ip> has changed and you have requested strict checking.
Host key verification failed.
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at io.c(453) [receiver=2.6.9]


I checked the "/root/.ssh/known_hosts" and the folder does not exist, I even used "find" to look for the file and it said that it did not exist. I checked the same directory on my local linux box and I see the "known_hosts" file, but it simply does not exist on the remote server. I reinstalled ssh with yast and it still did not work. What do I need to do in order to get ssh working properly, along with having the configuration file in the .ssh folder under the root directory?

Thanks ahead of time for the help!!!

geofoxer
Light Poster
39 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

I figured it out...

geofoxer
Light Poster
39 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

Yeah, the solution to this is to remove your .ssh/known_hosts file and reconnect.

linux
Posting Shark
933 posts since Aug 2006
Reputation Points: 118
Solved Threads: 30
 
Yeah, the solution to this is to remove your .ssh/known_hosts file and reconnect.


Not necessarily a good habit to get into. The warning is there for exactly that: to warn you. Someonecould be executing a man-in-the-middle attack, so I'd only recommend ignoring the warning if you actually know the reason (such as if you're got a LAN and you're connecting to a computer whose IP address has changed). Otherwise, proceed with extreme caution.

The other thing is that it's probably better to edit the known_hosts file and remove the offending key once you've identified that indeed the remote host key has changed, rather than deleting the file, as you'll lose all the keys to your other hosts that you've connected to in the past. This means that the next time you connect to them, you'll have no way of verifying if you're actually connecting to the same machine.

John A
Vampirical Lurker
Team Colleague
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
 

if the server you are connecting to has an IP assigned by DHCP you will get this error too

jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 600
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: