ssh_key_rotation
Rotating SSH keys is easy to get wrong in a way that locks you out of a server. This collection splits the job into three phases so a mistake fails safely instead of leaving a host unreachable: it validates the new key on the control node before touching anything, installs it alongside the old one, then reconnects using the new key to prove it works. Only then is the old key removed. Every sshd_config change is checked with sshd -t and backed up first, changes are applied with a reload rather than a restart so live sessions survive, and the lock-down is re-verified afterwards so a stray drop-in file or Match block cannot quietly leave password login enabled. Post-quantum and hybrid key exchange algorithms are supported as an opt-in. We have written up the full approach and what silently goes wrong.