mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08: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:
@@ -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
|
||||
|
||||
@@ -27,3 +27,4 @@ LoadCredential=tmpfiles.extra
|
||||
LoadCredential=login.motd
|
||||
LoadCredential=login.issue
|
||||
LoadCredential=network.hosts
|
||||
LoadCredential=ssh.authorized_keys.root
|
||||
|
||||
Reference in New Issue
Block a user