-
Notifications
You must be signed in to change notification settings - Fork 106
[ubuntu][24.04][v3.4.0] ssh host key changed after update #3370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Uh, this is an important one, thanks for the report. This is weird, I think the ssh folder is binded to persistent, so an upgrade should not affect the ssh keys in any way. |
installed 3.3.1 got the following keys:
which match the keys in the machine:
/etc/ssh is binded to persistent:
Will now upgrade and check |
After upgrade, indeed, the ssh fingerprint changed:
|
somehow the key has changed to the buildkit sandbox, so the key that was generated during the artifact building with init has ended up in the persistent. Probably some cloud-config is copying it on boot |
Yes, this is done by immucore, when it does a bind mount it first rsyncs the existing contents of the underlying mount as to not remove whats there, so in this case, it rsyncs the generated keys in the original image. Its clear, kairos-init should clear the /etc/ssh dir on building. |
kairos-io/kairos-init#67 to see the diff, will release init 0.4.6 to fix this |
manually tested, installed 3.3.1, ssh into it, added the fingerprint then upgraded to latest master build with init 0.4.6. Rebooted, ssh into it, same fingerprint. This is now on master so it should be fixed, will probably release a 3.4.1 patch version soon. |
Kairos version:
CPU architecture, OS, and Version:
I'm filing this after getting everything back into a good state, so I don't have this, but I was using
24.04-standard-amd64-generic-v3.4.0
from theKAIROS_IMAGE_LABEL
.Describe the bug
After upgrading, get the dreaded host identification has changed error:
To Reproduce
quay.io/kairos/ubuntu:24.04-standard-amd64-generic-v3.3.1-k3sv1.32.1-k3s1
kairos-agent upgrade --source oci:quay.io/kairos/ubuntu:24.04-standard-amd64-generic-v3.4.0-k3s1.31.7-k3s1
Expected behavior
ssh key should not change
The text was updated successfully, but these errors were encountered: