
Sometimes when connecting to a computer with SSH, things can get jumbled up and an error can occur that looks like this:

The purpose of the known_hosts file is for the client to authenticate the server they are connecting to.This error will occur when the public key the host has changes.To fix this we must remove the key causing the error.
Finding the known_hosts File in Linux/MAC:
The key you used to connected is stored in a file called known_hosts which is located in a hidden file (.ssh) in your home directory. It can be opened in a text editor of your choice with:
- vim ~/.ssh/known_hosts
You will notice the file is arranged:computername, ip-address veryLongKey, where each line is its own computer and key.
If you look at the error message you will notice this line: RSA host key for ras.mydomain.com has changed...This tells which is the offending host, so now you can remove that key by running:
ssh-keygen -R HOSTNAME
