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).