4
1
I'm receiving the wonderful "The authenticity of host xx can't be established." message when attempting to SSH into a box. I have two systems that recently swapped names. My system is a RHEL5.6 box.
System X with IP xx
System Y with IP yy
Changed to System X with IP yy, system Y with IP xx.
(hope that's easy enough to explain what we did)
I removed both systems from my .ssh/known_hosts file (and verified neither IP is listed anywhere), but when I SSH into one of them, it still shows the IP of the original name. The other system works no problem, but it appears that there is a cache somewhere that still has the old information.
I've completely cleared the known_hosts file, as well as rebooted the system, in an attempt to clear the problem, but with no luck.
Any ideas? I'm stumped! This is only happening on my system, nobody else has a problem.
Update: I had already removed the offending keys from the file. I had also completely erased the known_hosts file. It still happens. there is nothing different in the configuration of the .ssh than any other account. And if it was an error in the .ssh files, it would affect other ssh connections as well. But the other system that had swapped names with this one, does NOT give this problem. it works correctly. It is only one of the two systems having the problem. The box has been reloaded twice since this change as well. So I know it's not the server itself.
I found out that my coworker is also having the same issue now, with the same box. And only this one box.
So if our DNS zone files are correct, where could this possibly be coming from? Neither system involved in this change has the old information in it. our DNS looks clean. Our accounts do not reference the old info. tracert shows the old IP with the name, as does ping, and then ssh. But an nslookup using forward or reverse comes back correct. Kinda frustrating.
Could you post the exact error message? There are more locations than just
~/.ssh/known_hosts
. It could be DNS, or/etc/ssh/ssh_known_hosts
. – user1686 – 2011-04-06T11:42:25.547The offending keys are removed. The problem is that the IP address that shows with the host name when asking you to accept the connection (after the key is removed) is the old IP address. It is not the new one. Something is caching the old IP information. So when I select yes to connect, it connects to the old IP, which is the system it swapped names with. This only happens to one of the two boxes. Not both. – Chris – 2011-04-08T09:37:26.473
I also cannot post the exact message from my machine, as it is on a separate, closed network. But it is the same message that PriceChild shows above. I also verified that all the zone files in DNS are correct. Even reloaded named and when that still didn't work, rebooted just to make sure any cache was cleared. – Chris – 2011-04-08T09:38:56.520
Might want to post these as comments or edits to your question rather than 'answers'. I'm afraid this isn't like a 'forum' :-) Do you have something odd set in your ~/.ssh/config ? Did you try deleting the key from the file/line specified like I suggested? – Pricey – 2011-04-08T09:52:04.713
FYI I've merged your fragmented accounts together and tidied up the location of what has been posted a bit. If you log in with your Open ID from now on then you'll have the correct ownership of everything you've posted on this thread so far. – DMA57361 – 2011-04-08T13:11:40.967