How to fix Warning: the ECDSA host key differs from

Posted on July 21, 2018 at 2:29 pm

If you get this error while setting up password-less SSH with ssh-copy-id:

 Warning: the ECDSA host key for 'server' differs from the key for the IP address ''

Try to remove the cached key for the server IP address:

ssh-keygen -R

Alternatively, if you get also these details in the error message:

Offending key for IP in /home/user/.ssh/known_hosts:11
Matching host key in /home/user/.ssh/known_hosts:28

Just manually edit ~/.ssh/known_hosts and delete line 11 (“Offending key”).

Then try to reconnect and everything should work fine.

Receive updates via email

Other Posts

Updated Posts