2 changed files with 15 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
[Unit] |
|||
Description=Regenerate SSH host keys |
|||
Before=ssh.service |
|||
ConditionFileIsExecutable=/usr/bin/ssh-keygen |
|||
|
|||
[Service] |
|||
Type=oneshot |
|||
ExecStartPre=-/bin/dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 |
|||
ExecStartPre=-/bin/sh -c "/bin/rm -f -v /etc/ssh/ssh_host_*_key*" |
|||
ExecStart=/usr/bin/ssh-keygen -A -v |
|||
ExecStartPost=/bin/systemctl disable regenerate_ssh_host_keys |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
Loading…
Reference in new issue