RSA Key Error using SSH on a reinstalled CVM

If you have ever had to reinstall a CVM you find when you next try to SSH into it you will get the following message :

Screenshot 1

 

This is because the RSA key will have changed during the reinstall and the key stored locally on your laptop will be the old one. To fix the issue for OSX system I used the following command in terminal :

# rm -rf /Users/myusername/.ssh/known_hosts

*replace myusername with the name of your username

This was the easiest way to fix the message. This will cause no harm to your system. There will be a prompt (yes/no) to accept the new key when you try to ssh into the cvm again.

Another way to do it would be to open the file /Users/myusername/.ssh/known_hosts and in taking the picture above as an example delete the 115th line which has the older ssh key.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s