summarylogtreecommitdiffstats
path: root/sshdgenkeys.service
diff options
context:
space:
mode:
authorPaolo Stivanin2015-10-26 10:35:02 +0100
committerPaolo Stivanin2015-10-26 10:35:02 +0100
commitcf8be688fb306f04888a4f42f00324f98310dc8f (patch)
treebbd1e67246fc752d0044849ca1523be10421c6e1 /sshdgenkeys.service
downloadaur-cf8be688fb306f04888a4f42f00324f98310dc8f.tar.gz
first release
Diffstat (limited to 'sshdgenkeys.service')
-rw-r--r--sshdgenkeys.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/sshdgenkeys.service b/sshdgenkeys.service
new file mode 100644
index 000000000000..1d01b7acff4b
--- /dev/null
+++ b/sshdgenkeys.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=SSH Key Generation
+ConditionPathExists=|!/etc/ssh/ssh_host_key
+ConditionPathExists=|!/etc/ssh/ssh_host_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_dsa_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key.pub
+ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
+ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key.pub
+
+[Service]
+ExecStart=/usr/bin/ssh-keygen -A
+Type=oneshot
+RemainAfterExit=yes