scp error:Host key verification failed.


Please contact your system administrator.
Add correct host key in /home/computeruser/.ssh/known_hosts to get rid of this message.
Offending key in /home/computeruser/.ssh/known_hosts:10
RSA host key for ***.**.**.*** has changed and you have requested strict checking.
Host key verification failed.

What does it mean

The error is most likely caused by the fact that your machine has a RSA host key in its known_hosts file that is tied to the ip address ***.**.**.*** (listed in the error message) this key does not match the one just supplied from that IP address.

This has happened to us when we have two virtual machines with the same IP that take it in turns to be powered up and communicate with a third PC.

How to fix it

If you trust the source ie copying files to yourself and want to continue. Remove the nth key (as per error message above abovehosts:n) . This will now give you a message in the teminal along the lines of RSA fingerprint is ***** are you sure you want to continue connecting (yes/no)?

About me

My name is Tim and I strive to help others.

Something unique for you

Display all 172 possibilities? (y or n)

Please purchase a custom T-Shirt from me to help keep this Blog alive


5 thoughts on “scp error:Host key verification failed.

  1. To remove the nth key I am suggesting that you use a text editor for example vim ( you can see a list of commands here )
    Just off the top of my head I would open the file in vim eg.
    >>> vim filename
    Then once I am looking at the file displayed in vim I would arrow down to the start of the line that I want removed and press the escape key followed by dd (delete a line – see vim instructions).
    To save the file and exit vim you press the escape key then add the character called colon (:) the letter w (w) and the letter q (q) and press the enter key.

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s