From: Sam Leonard Date: Fri, 12 Apr 2024 16:03:00 +0000 (+0100) Subject: man: add ssh example for vmspawn X-Git-Tag: v256-rc1~109^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1490debd620e254e151761fcc30ffdc9ec63e5fe;p=thirdparty%2Fsystemd.git man: add ssh example for vmspawn --- diff --git a/man/systemd-vmspawn.xml b/man/systemd-vmspawn.xml index e8d460ef4fc..336ebe9f520 100644 --- a/man/systemd-vmspawn.xml +++ b/man/systemd-vmspawn.xml @@ -541,6 +541,22 @@ $ systemd-vmspawn \ Note: this example also uses a kernel command line argument to ensure SELinux isn't started in enforcing mode. + + + SSH into a running VM using <command>systemd-ssh-proxy</command> + + +$ mkosi build +$ my_vsock_cid=3735928559 +$ systemd-vmspawn \ + -D mkosi.output/system \ + --private-users $(grep $(whoami) /etc/subuid | cut -d: -f2) \ + --linux mkosi.output/system.efi \ + --vsock-cid $my_vsock_cid \ + enforcing=0 +$ ssh root@vsock/$my_vsock_cid -i /run/user/$UID/systemd/vmspawn/machine-*-system-ed25519 + +