Host key verification failed and makes migration failed

danielc

Member
Feb 28, 2018
35
2
13
41
Hello

How can we fixed this error from a cluster? It comes in loop and loop and loop

2018-03-26 22:48:24 # /usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=HV1' root@10.20.1.15 /bin/true
2018-03-26 22:48:24 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2018-03-26 22:48:24 @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
2018-03-26 22:48:24 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2018-03-26 22:48:24 IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
2018-03-26 22:48:24 Someone could be eavesdropping on you right now (man-in-the-middle attack)!
2018-03-26 22:48:24 It is also possible that a host key has just been changed.
2018-03-26 22:48:24 The fingerprint for the RSA key sent by the remote host is
2018-03-26 22:48:24 SHA256:dm8ZRwadi5u48jeT44EoDQUvhM9uLnbq19c6ZfQzdbQ.
2018-03-26 22:48:24 Please contact your system administrator.
2018-03-26 22:48:24 Add correct host key in /root/.ssh/known_hosts to get rid of this message.
2018-03-26 22:48:24 Offending RSA key in /etc/ssh/ssh_known_hosts:12
2018-03-26 22:48:24 remove with:
2018-03-26 22:48:24 ssh-keygen -f "/etc/ssh/ssh_known_hosts" -R hv1
2018-03-26 22:48:24 RSA host key for hv1 has changed and you have requested strict checking.
2018-03-26 22:48:24 Host key verification failed.
2018-03-26 22:48:24 ERROR: migration aborted (duration 00:00:00): Can't connect to destination address using public key
TASK ERROR: migration aborted

Background: Installed 4 HV nodes, 2 dead, and now all 4 nodes cannot migrated to each other due to delnode and reinstall

Tried all not working
echo > /root/.ssh/known_hosts
echo > /etc/ssh/ssh_known_hosts

(in each HV node)
mv /root/.ssh/known_hosts /root/.ssh/known_hosts.bad
systemctl restart pve-cluster

pvecm add 10.20.1.11 -f (re-add to master)
pvecm updatecerts

Eventhough ssh to node ok, it still comes back this error
Would you please help me out of this loop please?
 
first you have to remove the key in the correct file like this message says:
2018-03-26 22:48:24 Offending RSA key in /etc/ssh/ssh_known_hosts:12
2018-03-26 22:48:24 remove with:
2018-03-26 22:48:24 ssh-keygen -f "/etc/ssh/ssh_known_hosts" -R hv1

then you have to initiate the correct ssh commandline
Code:
 /usr/bin/ssh -e none -o 'HostKeyAlias=HV1' root@10.20.1.15 /bin/true

from the correct node
 
  • Like
Reactions: feidianbo
Thanks staff member, my problem solved!
code_language.shell:
$ /usr/bin/ssh -e none -o 'HostKeyAlias=ksd' root@192.168.2.24 /bin/true
 
Hi,
Hello coworkers

I had the same problem and this actions not solved

please help me

thanks

=(
could you post the exact error you get and the commands you issued?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!