summarylogtreecommitdiffstats
path: root/sshdgenkeys.service
blob: c3ebb1303543fd18bf24d4f72ddff5f3c13b999d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[Unit]
Description=SSH-HPN Key Generation (upstream shim)
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
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key.pub

[Service]
# this is horrifying, but doesn't require backflips with prefixes
ExecStart=/usr/bin/hpnssh-keygen -f /etc/ssh/ssh_host_ed25519_key -t ed25519
ExecStart=/usr/bin/hpnssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -t ecdsa -b 521
ExecStart=/usr/bin/hpnssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -b 4096
ExecStart=/usr/bin/hpnssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa
Type=oneshot
RemainAfterExit=yes