-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman machine init fails if name collides with existing user ssh key #17521
Comments
Not fully covered, but partially related to #16710 May be it will be possible to design a solution, which fixes both. |
A friendly reminder that this issue had no activity for 30 days. |
Documented my vision on how this (together with another issue) could be fixed in this comment: #16710 (comment) |
A friendly reminder that this issue had no activity for 30 days. |
I can confirm that this is still an issue with Podman Desktop 1.4.0 (Podman 4.6.2). The fix for me was to run
Then |
I did some work on this. I can revisit the topic, when I receive feedback from the Podman development team in #18487 |
I think this was fixed in 5.0 as we no longer use .ssh to write the key there |
Issue Description
On MacOS M1, creating a QEMU machine with
podman machine init <name>
will fail if user generated key~/.ssh/<name>
already exists.Although the default name is fairly specific (
podman-machine-default
) and unlikely to clash with other keys, others may not be (E.g.test
).Podman should not be creating keys in
~/.ssh/*
anyway but should be saving them in its config directory~/.config/containers/podman/...
as users should be usingpodman machine ssh <name>
to ssh into the box and not invokingssh
command directly.For comparison, minikube when using the qemu driver, writes SSH keys to
~/.minikube/machines/<name>/id_rsa{,.pub}
.Vagrant also does something similar if I recall.
Ideally all per-machine configuration and data (json config, ignition file) should be written to a folder with the name of the machine, i.e.
but I note this is not currently the case (for qemu VMs at least) using a mixture of both prefix naming and directory naming.
Is this a problem if
<name>
isqemu
?Also note that deleting the machine doesn't actually delete the
~/.local/share/containers/podman/machine/<name>
directory.Steps to reproduce the issue
Steps to reproduce the issue
ssh-keygen -N "" -t ed25519 -C 'Manually created' -f ~/.ssh/test
podman machine init test
Describe the results you received
Describe the results you expected
Machine created successfully. And ssh key generation does not pollute
~/.ssh
folderpodman info output
The text was updated successfully, but these errors were encountered: