Making rootless containers the default breaks SSH keys on the server side #487
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi! I recently upgraded gitea via the helm chart. After an upgrade from helm chart 8.3.0 to 9.1.0, the SSH key for gitea changed and I got a
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED
warning.ssh-keyscan
tells me the server only understandsssh-rsa
and notssh-ed25519
. Anls -la
in/data/ssh
showswhich seems like gitea is no longer using the standard
ssh_host_*
files and is usinggitea.rsa
instead.I found that
START_SSH_SERVER
has been set totrue
inapp.ini
, and it was repeatedly set to true after every pod restart (which was confusing since the documentation assured me it wasfalse
by default). After some digging, I found this to be the culprit, which setsSTART_SSH_SERVER
if we use rootless containers, which seems to betrue
by default since9.0.0
. Sure enough, after I setimage.rootless: false
, the issue went away and I didn't have to modify.ssh/known_hosts
on all my devices.I found a discussion here, which seems to suggest this isn't an issue, but it was for me. I imagine the lack of user reports might be because people just rotated their
.ssh/known_hosts
to get rid of the warning. If there's some way for the internal SSH server to read the samessh_host_*
files, that'd be great. Otherwise, I think there should be a warning under the upgrade section on this.Hi Kevin
Yes, the chart switched to the rootless image lately. And this image uses a different, built-in SSH server.
Sorry to hear and thanks for reporting!
Could be even though I would have expected more or earlier reports of this.
Yes that's a bit of a tricky thing where the helm-chart differs from the actual default for good reason.
I am not sure the built-in one can handle the new
ed25519
format which is what your error message indicates.That would definitely make sense overall, maybe something that should be discussed on the project level. In the meantime I've added your report here to the upgrade notes, thanks again!
Cool, thanks for adding the note in the README! I'll leave this open in case you want to use it to track an upstream fix, or you can close it since the breaking change is now reflected in the upgrade notes.
I'm running into this issue as well. My values files at this time for the deployment can be found here.
When I'm running more than a single node, the fingerprint from
ssh-keyscan
switches between as many replicas exist.Tried switching over to the privileged images/deployment, but it didn't seem to work for me. Happy to help troubleshoot however I can!
@danmanners Please open a new issue (with logs and a thorough description) as your issue seems to be unrelated to rootless/rootful images.