Warning: the RSA host key for 'github.com' differs from the key for the IP address 'x.x.x.x'
Offending key for IP in /root/.ssh/known_hosts:5
Matching host key in /root/.ssh/known_hosts:9
Are you sure you want to continue connecting (yes/no)?
You can add the RSA host key for
github.com to your server's
known_hosts file to avoid seeing this warning every time you run
git pull. Here's how to do it:
1.Open a terminal on your server and run the following command to remove the offending key for the IP address from the
ssh-keygen -R x.x.x.x
2.Run the following command to add the RSA host key for
github.com to the
ssh-keyscan github.com >> ~/.ssh/known_hosts
This will append the RSA host key for
github.com to the end of the
known_hosts file in your home directory.
After running these commands, you should be able to run
git pull without seeing the warning message again.