r/ssh-host-certs: Reload sshd after renewing certs
In Fedora 41, it seems the SSH daemon no longer automatically uses the new certificate after its host certificates have been renewed. To get it to pick up the new ones, we have to explicitly tell it to reload. To handle that automatically, I've added a new systemd path unit that monitors the certificate files. When it detects that one of them has changed, it will send the signal to the SSH daemon to tell it to reload.
This commit is contained in:
11
roles/ssh-host-certs/files/reload-ssh-cert.path
Normal file
11
roles/ssh-host-certs/files/reload-ssh-cert.path
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Watch SSH Host certificates for renewal
|
||||
After=sshd.service
|
||||
|
||||
[Path]
|
||||
PathChanged=/etc/ssh/ssh_host_rsa_key-cert.pub
|
||||
PathChanged=/etc/ssh/ssh_host_ecdsa_key-cert.pub
|
||||
PathChanged=/etc/ssh/ssh_host_ed25519-cert.pub
|
||||
|
||||
[Install]
|
||||
WantedBy=paths.target
|
||||
Reference in New Issue
Block a user