What breaks a manual SSH rotation?
The dangerous sequence is to delete or overwrite the old authorized key before any independent proof that the replacement works. A locally generated key pair does not mean the gateway trusts it. A successful connection through an already-open session does not prove future access.
The safer five-step sequence
- Identify the exact gateway and account. Check known-host identity and verify the currently authorized key can establish a new connection.
- Create a fresh protected identity. Keep the old private key intact while generating the replacement Ed25519 pair; store passphrases separately.
- Enroll only the new public key. Use the working old key to authenticate to Linux. Do not require a password login that the gateway has deliberately disabled.
- Prove a genuinely new connection. Force public-key authentication with the replacement identity and no account-password fallback. Verify that the intended account and gateway accept it.
- Review and authorize scoped revocation. Only after successful proof should the old public key be removed from the selected account’s authorized-key source. Verify access once more and retain audit evidence.
When compromise is suspected: authorize the complete replacement-and-revocation transaction rather than approving removal of an untested key. A safe implementation can revoke the previously identified old entry immediately after the independent replacement login passes, with no hazardous gap between proof and revocation. That specific live emergency behavior remains a beta acceptance target; do not assume it was demonstrated by the USB recovery field test. Learn what it means to burn old key access.
How XSSG handles the sequence
XSSG’s guided rotation and emergency re-key flows are designed to preserve old-key access until the new public key is installed and tested. The program produces explicit status messages rather than assuming a successful enrollment. The emergency path remains beta and requires a live, isolated test before production use.
Common questions
Can I rotate an SSH key without re-enabling PasswordAuthentication?
Yes, provided a working authentication or authorized recovery path exists. The old key can grant permission to add the new public key without changing the server’s SSH password policy.
Does revoking an SSH key disconnect established sessions?
Removing a public key from an authorization file normally prevents subsequent authentication through that entry; it does not itself prove established sessions are terminated or that alternate authentication paths were removed.
What if the old private key is stolen?
Prioritize containment, independent recovery access and correct scoped revocation. Do not assume the host is trustworthy merely because you changed a credential. See the emergency SSH response guide.
Sources
OpenSSH documentation · NIST SSH access-management guidance · Security Alliance key-hardening guide
Evidence and engineering boundaries
The Mac acceptance run described here is a single operator-provided field transcript, not an independent certification or fleet-wide result. The XSSG v0.9.9-beta31 package remains beta software. Emergency revocation and poweroff are available for authorized testing, not represented as field-proven production controls. Verify every change on your own equipment with recovery access available.
Current release gates · Security claims and limitations · Operator manual