Skip to content
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

Support mkosi ssh for multiple running instances of the same image #2564

Merged
merged 4 commits into from
Mar 28, 2024

Conversation

DaanDeMeyer
Copy link
Contributor

Let's add a stopgap solution until systemd-machined supports everything we need. We maintain a super basic JSON state file in the runtime directory that is used to map a machine name to the corresponding SSH proxy command.

We also store the path to the ssh key in there so that mkosi ssh can be run from every directory.

The new Machine= option allows selecting the machine name to use. Unless set explicitly, we also use the machine name as the hostname for the machine.

mkosi/resources/mkosi.md Outdated Show resolved Hide resolved
mkosi/config.py Outdated Show resolved Hide resolved
mkosi/qemu.py Outdated Show resolved Hide resolved
mkosi/config.py Outdated Show resolved Hide resolved
mkosi/run.py Dismissed Show dismissed Hide dismissed
mkosi/qemu.py Outdated Show resolved Hide resolved
Let's add a stopgap solution until systemd-machined supports everything
we need. We maintain a super basic JSON state file in the runtime directory
that is used to map a machine name to the corresponding SSH proxy command.

We also store the path to the ssh key in there so that mkosi ssh can be
run from every directory.

The new Machine= option allows selecting the machine name to use. Unless
set explicitly, we also use the machine name as the hostname for the machine.
These might be long running so let's make them more introspectible
by allocating a scope for them and registering them with machined
if possible.
@DaanDeMeyer DaanDeMeyer merged commit c6dc3c8 into systemd:main Mar 28, 2024
30 checks passed
@DaanDeMeyer DaanDeMeyer deleted the ssh branch March 28, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants