]> xenbits.xensource.com Git - libvirt.git/commit
tools: Introduce SSH proxy
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 16 Apr 2024 14:32:26 +0000 (16:32 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 13 May 2024 06:56:35 +0000 (08:56 +0200)
commit0287b5dfd22aa4b7db6eeafda82a49f6ca206f97
tree59c274d9e3d467af79e141a26288837af6d66a81
parent9e59ba56c8a26156799a556fa79c9654a5d1acd4
tools: Introduce SSH proxy

This allows users to SSH into a domain with a VSOCK device:

  ssh user@qemu/machineName

So far, only QEMU domains are supported AND qemu:///system is
looked for the first for 'machineName' followed by
qemu:///session. I took an inspiration from Systemd's ssh proxy
[1] [2].

To just work out of the box, it requires (yet unreleased) systemd
to be running inside the guest to set up a socket activated SSHD
on the VSOCK. Alternatively, users can set up the socket
activation themselves, or just run a socat that'll forward vsock
<-> TCP communication.

1: https://github.com/systemd/systemd/blob/main/src/ssh-generator/ssh-proxy.c
2: https://github.com/systemd/systemd/blob/main/src/ssh-generator/20-systemd-ssh-proxy.conf.in

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/579
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
libvirt.spec.in
meson.build
meson_options.txt
po/POTFILES
tools/meson.build
tools/ssh-proxy/30-libvirt-ssh-proxy.conf.in [new file with mode: 0644]
tools/ssh-proxy/meson.build [new file with mode: 0644]
tools/ssh-proxy/ssh-proxy.c [new file with mode: 0644]