ssh – Host key verification failed

Question:

I am using VPS from DigitalOcean.
First I generated an ssh key: ssh-keygen -t rsa . Then he added it to the security of the droplet itself, having previously copied it in this way: cat ~/.ssh/id_rsa.pub .
When connected via ssh root@[your.ip.address.here] throws an exception:

Host key verification failed

What could it be because of?

Answer:

when connecting via ssh root@[your.ip.address.here] throws out – Host key verification failed . What could it be because of?

due to the fact that the fingerprint of the key with which the other party ( [your.ip.address.here] ) offers to encrypt the data does not match the saved fingerprint.

it is possible that changing the key by the second party is somehow related to your actions – added it to the security of the droplet itself . I have no idea what kind of "droplet" it is, and what kind of "security" it might have, but if you are sure that it should have been, you can delete the previous saved snapshot:

$ ssh-keygen -R [your.ip.address.here]
Scroll to Top