1
0
mirror of https://github.com/systemd/systemd synced 2024-07-05 17:39:42 +00:00

tmpfiles: add lines for provisioning ssh keys for root by default

With this, I can now easily do:

    systemd-nspawn --load-credential=ssh.authorized_keys.root:/home/lennart/.ssh/authorized_keys --image=… --boot

To boot into an image with my SSH key copied in. Yay!
This commit is contained in:
Lennart Poettering 2022-09-15 19:35:36 +01:00
parent 27f6aa0b71
commit 4cebd207d1
2 changed files with 6 additions and 0 deletions

View File

@ -15,3 +15,8 @@ f^ /etc/issue.d/50-provision.conf - - - - login.issue
# Provision a /etc/hosts file from credentials.
f^ /etc/hosts - - - - network.hosts
# Provision SSH key for root
d /root :0700 root :root -
d /root/.ssh :0700 root :root -
f^ /root/.ssh/authorized_keys :0600 root :root - ssh.authorized_keys.root

View File

@ -27,3 +27,4 @@ LoadCredential=tmpfiles.extra
LoadCredential=login.motd
LoadCredential=login.issue
LoadCredential=network.hosts
LoadCredential=ssh.authorized_keys.root