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?

Remove the cached key for on the local machine:

ssh-keygen -R