Ubuntu – How to fix warning about ECDSA host key

Securitysshssh-keysubuntu server

I'm trying to setup password-less SSH on an Ubuntu server with ssh-copy-id myuser@myserver, but I'm getting the error:

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

What's causing this, and how do I fix it? I tried deleting the .ssh directory on the remote machine, and running ssh-keygen -R "myserver" locally, but this doesn't resolve the error.

Best Answer

Remove the cached key for on the local machine:

ssh-keygen -R
Related Question