]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: add ssh example for vmspawn
authorSam Leonard <sam.leonard@codethink.co.uk>
Fri, 12 Apr 2024 16:03:00 +0000 (17:03 +0100)
committerSam Leonard <sam.leonard@codethink.co.uk>
Fri, 19 Apr 2024 15:38:49 +0000 (16:38 +0100)
man/systemd-vmspawn.xml

index e8d460ef4fc248671894fe61bf1940eef7f67bc5..336ebe9f5203e28866f450bfb76608cf522fa5c7 100644 (file)
@@ -541,6 +541,22 @@ $ systemd-vmspawn \
 
       <para>Note: this example also uses a kernel command line argument to ensure SELinux isn't started in enforcing mode.</para>
     </example>
+
+    <example>
+      <title>SSH into a running VM using <command>systemd-ssh-proxy</command></title>
+
+      <programlisting>
+$ 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
+      </programlisting>
+    </example>
   </refsect1>
 
   <refsect1>