Remove Entry from Known Host

time to read 1 min | 87 words

Sometimes I am moving my domain from one server to another and facing this problem

Add correct host key in /home/rezha/.ssh/known_hosts to get rid of this message.
Offending key in /home/rezha/.ssh/known_hosts:60
RSA host key for rezhajulio.id has changed and you have requested strict checking.
Host key verification failed.

I am just too lazy to find line 60 of known_host I ended up deleting the entire known_host. Use this command to remove entries from known_hosts:

ssh-keygen -R rezhajulio.id

Change it with your own conflicted hostname or IP address