Solve SSH Host key verification failed

Today, 4th December 2022, Ukraine is still bravely fighting for democratic values, human rights and peace in whole world. Russians ruthlessly kill all civilians in Ukraine including childs and destroy their cities. We are uniting against Putinโ€™s invasion and violence, in support of the people in Ukraine. You can help by donating to Ukrainian's army.

If you get Host key verification failed , then it means that the host key of the remote host was changed. For example, it may be the case when you reinstalled OS on the remote host.

To solve this you need to remove the remote host from ~/.ssh/known_hosts. But instead of editing this file directly just run:

ssh-keygen -R

Where - IP of remote host (which you try to connect).

Ivan Borshchov profile picture
Nov 04, 2016
by Ivan Borshchov
Did it help you?
Yes !

Best related