Ceph Error “Warning: the ECDSA host key for ‘SERVER’ differs from the key for the IP address ‘IP'”
Category : How-to
I recently received the below error when installing Ceph on Proxmox which related the the key for the local machine. After running the ceph-deploy install command I was presented with an error and the Ceph command halted.
ceph-deploy install ceph1.jamescoyle.net ceph2.jamescoyle.net ceph3.jamescoyle.net
After agreeing to the initial prompt I received the below error.
Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ceph1.jamescoyle.net' (ECDSA) to the list of known hosts. Warning: the ECDSA host key for 'ceph1.jamescoyle.net' differs from the key for the IP address '192.168.50.102' Offending key for IP in /etc/ssh/ssh_known_hosts:2 Are you sure you want to continue connecting (yes/no)? yes Write failed: Broken pipe [ceph_deploy][ERROR ] RuntimeError: connecting to host: ceph1.jamescoyle.net resulted in errors: HostNotFound ceph1.jamescoyle.net
You need to remove the local key using ssh-keygen and then allow the machine to re-add the key when you first connect to it. The above error was complaining about the key for IP 192.168.50.102, therefore add this IP to the end of the below command.
ssh-keygen -R [IP]
ssh-keygen -R 192.168.50.102 /root/.ssh/known_hosts updated. Original contents retained as /root/.ssh/known_hosts.old
Now rerun your Ceph command and accept the key warning and your Ceph command should complete.