Add service file to regenerate SSH host keys
Gamb1t
2 years ago
|
0 |
[Unit]
|
|
1 |
Description=Regenerate SSH host keys
|
|
2 |
ConditionPathExists=/usr/sbin/sshd
|
|
3 |
Before=ssh.service
|
|
4 |
ConditionPathExistsGlob=!/etc/ssh/ssh_host_*_key
|
|
5 |
|
|
6 |
[Service]
|
|
7 |
Type=oneshot
|
|
8 |
ExecStart=/usr/bin/ssh-keygen -A
|
|
9 |
|
|
10 |
[Install]
|
|
11 |
RequiredBy=multi-user.target
|