rsa host key error while trying to ssh to server
I get the following error when attempting to ssh to my server:
========= Warning: the RSA host key for 'myServer' differs from the key for the IP address '192.168.0.1' Offending key for IP in /home/user/.ssh/known_hosts:112 Matching host key in /home/user/.ssh/known_hosts:349 Are you sure you want to continue connecting (yes/no)? ========= I have already attempted removing myServer from my known_hosts file and reattempting to ssh. Each time I access myServer I get this error, type yes and then gain access. Even though I gain access, I shouldn't be receiving this error. :confused: |
remove 192.168.0.1 from your known_hosts file line 112.
|
There is no 192.168.0.1 in the known_hosts file.
|
Remove line 112 and 349 from known hosts.
|
I've tried that. I've removed all records of myServer and 192.168.0.1 from the known_hosts file.
|
Quote:
|
Here are my steps: ssh myServer, yes, yes, I'm on myServer
Each time I remove the entry with 'myServer' in it, I get the below error: ========= The authenticity of host 'myServer' (192.168.0.1)' can't be established. RSA key fingerprint is xx:xx:xx Are you sure you want to continue connecting (yes/no)? yes <- I typed Warning: Permanently added 'myServer' (RSA) to the list of known hosts. Warning: the RSA host key for 'myServer' differs from the key for the IP address '192.168.0.1' Offending key for IP in /home/user/.ssh/known_hosts:112 Are you sure you want to continue connecting (yes/no)? yes <- I typed Last Login: Thur Jul 8 07:13:59 from myComputer.myDomain.com ========= I still get on the server, however I get the above error. |
Quote:
You need to remove the entries from known_hosts on the local server not the remote server. |
No, sorry. There's been a misunderstanding\miscommunication. Those were my actions. I'm on myComputer sshing to myServer. ACTION: myComputer# ssh myServer PROMPT: Are you sure you want to continue connecting (yes/no)? ACTION: yes PROMPT: Are you sure you want to continue connecting (yes/no)? ACTION: yes RESULT I have successfully ssh'd to myServer from myComputer.
I have removed all myServer entries from the known_hosts file whilest on myComputer and still receive the error: ========= The authenticity of host 'myServer' (192.168.0.1)' can't be established. RSA key fingerprint is xx:xx:xx Are you sure you want to continue connecting (yes/no)? yes <- I typed Warning: Permanently added 'myServer' (RSA) to the list of known hosts. Warning: the RSA host key for 'myServer' differs from the key for the IP address '192.168.0.1' Offending key for IP in /home/user/.ssh/known_hosts:112 Are you sure you want to continue connecting (yes/no)? yes <- I typed Last Login: Thur Jul 8 07:13:59 from myComputer.myDomain.com ========= |
YOu have to clear known_hosts on your computer, not the server.
|
Quote:
|
I think I figured out something. The IP address of myServer was missing from known_hosts file. After sshing to myServer and loging out, I edited my known_hosts file and saw:
myServer ssh-rsa AAAAWEFv4df5asbzasasfeawbnoosdnf0asn0na0 myServer2, 192.168.0.2 ssh-rsa AAAAWEFv0ng0nasdfjw0asnoosdnf0asdfg433bF myServer3, 192.168.0.3 ssh-rsa AAAAWEFasdfe0ng0n0asnsh6RGsfsfkgTasd0sdg == After adding my IP address to myServer, I ssh'd to myServer and got in w/o errors. Do you know what I need to do to have myServer write the IP to my known_hosts file? |
This happened to me as well. What I noticed is that there were two entries in my client known_hosts file, one under server name, the other under ip address. When I removed both entries, I was able to clear this error.
|
All times are GMT -5. The time now is 11:59 PM. |