Originally posted by svenwinkle
Hey, here's how you fix your problem. ssh grabs information from the computer that you are connecting to and stores it in a file. If the computer you are connecting to ever reboots or reconfigures its keys, the stored key you have on your computer will no longer work. When this happens, the easiest way (I have found) to resolve the issue is to go into that file where the key information about the other computer is stored and erase that computer's entry. You can then re-connect and get new key information that your computer will accept.
The file is called known_hosts. It is stored in your user's home directory inside a folder called .ssh. You won't see this folder during a normal directory listing (ls), but if you use ls -a you will see it. So the full path is then /home/<username>/.ssh/known_hosts
Use your editor of choice (mine is vi) to access that file. You will see an entry for every computer you have ever used ssh to access. For each computer there will be an entry similar to the following:
192.168.50.188 ssh-rsa AAAAB3NzaC1yc2EAAAABIwBBBIEA4j3rP1kgqZNKmk198dp9ZatqAV7KnPmI
This is all one entry. You can identify the entry belonging to the computer in question by the IP address. Delete that entire line(in vi you just move the cursor to the line and type dd). Save the file and exit (in vi the command for that is :wq!) .
When you are finished with that, you can connect into the remote computer again with ssh. You will have to type 'yes' again when it asks if you want to accept the host key. At that point it should be working properly.
Correct me if I am wrong.
I also have experienced the problem you have mentioned i.e. if the host computer changes it's keys (not reboots) you get such an error and the best solution is to delete the entry corresponding to that particular I.P. from the ~/.ssh/known_hosts file.
But in that case the error you get is somewhat like this (I do not remember the exact error, though) : Remote key for concerned host has been changed. Host key verification failed. This might mean that somebody is spying on you, if this is not the case, edit the file ~/.ssh/known_hosts.
But in case of Bruse, he is getting the error : No RSA host key is known
for 10.255.240.102 and you have requested strict checking.
Host key verification failed.
This indicates that the RSA key does not exist (not changed), and since the user has requested strict checking Host key verification has failed.
I may be wrong though as I do not remember exactly what error you get in case of changed RSA keys.
My Apologies if that is the case
Hope this helps.