From: Luca Boccassi Date: Thu, 8 Sep 2022 15:27:52 +0000 (+0100) Subject: man: add example with one-liner for ssh provisioning via tmpfiles.d + Creds X-Git-Tag: v252-rc1~227^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87d1886346ab0bc57fae6f1e6e10646f088cc3f6;p=thirdparty%2Fsystemd.git man: add example with one-liner for ssh provisioning via tmpfiles.d + Creds --- diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 04617bc5326..15785d1bf2a 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -826,6 +826,19 @@ e! /var/cache/krb5rcache - - - 0 will be removed on boot. The directory will not be created. + + + Provision SSH public key access for root user via Credentials in QEMU + + -smbios type=11,value=io.systemd.credential.binary:tmpfiles.extra=$(echo "f~ /root/.ssh/authorized_keys 700 root root - $(ssh-add -L | base64 -w 0)" | base64 -w 0) + + + By passing this line to QEMU, the public key of the current user will be encoded in + base64, added to a tmpfiles.d line that tells systemd-tmpfiles to decode it into + /root/.ssh/authorized_keys, encode that line itself in base64 and + pass it as a Credential that will be picked up by systemd from SMBIOS on boot. + +