ssh: how to fix warning about ECDSA host key

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 ‘192.168.1.123’

What’s causing this, and how do I fix it?

Remove the cached key for 192.168.1.123 on the local machine:

ssh-keygen -R 192.168.1.123

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.