etc/systemd
This commit is contained in:
14
etc/systemd/system/ssh.socket.wants/sshd-keygen.service
Normal file
14
etc/systemd/system/ssh.socket.wants/sshd-keygen.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Generate sshd host keys on first boot
|
||||
ConditionFirstBoot=yes
|
||||
ConditionPathIsReadWrite=/etc/ssh
|
||||
ConditionPathIsSymbolicLink=!/etc/ssh
|
||||
Before=ssh.service sshd.service sshd@.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=ssh-keygen -A
|
||||
|
||||
[Install]
|
||||
WantedBy=ssh.service sshd.service sshd@.service ssh.socket
|
||||
Reference in New Issue
Block a user