ClusterLabs / anvil

The Anvil! Intelligent Availability™ Platform, mark 3
5 stars 6 forks source link

If a node is being rebuilt, the host key becomes invalid, preventing initializing the node #642

Closed digimer closed 3 months ago

digimer commented 5 months ago

If the host key has changed, the attempt to initialize fails with a credentials error;

image

When the key is bad, it should say as much, and a link to remove the offending key.

[root@an-striker01 ~]# ssh root@192.168.10.2
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:8/PcmgLT1ExWSxzzjNC/TfJxLXPEyUii9W852S2tY5I.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending ED25519 key in /root/.ssh/known_hosts:12
Host key for 192.168.10.2 has changed and you have requested strict checking.
Host key verification failed.
digimer commented 5 months ago

Perhaps this should be a different issue. If so, split it off.

When there is a bad key, there should be an alert somewhere visible, like a yellow ! mark or similar, that alerts the user.

image

digimer commented 5 months ago

Don't close this until we can confirm that issue #500