Post-Quantum SSH and Git Infrastructure: Engineering Around NSA PP-26-4956
An engineering deep dive into post-quantum and 'post-AI' cryptographic hardening for SSH clients, Ubuntu and Windows OpenSSH servers, short-lived SSH CAs, Git transport, CI OIDC identity and long-term commit provenance.
The standard DevOps security baseline of the early 2020s — “disable passwords, prefer ed25519, keep RSA-2048 for compatibility” — broke on 1–2 December 2026.
NSA Cybersecurity Advisory PP-26-4956 (Immediate Actions to Push Toward Post-Quantum), alongside the joint NSA/CISA/ONCD statement and a coordinated backing statement from eight major technology firms (Amazon, Anthropic, Apple, Cloudflare, Google, Microsoft, OpenAI and Oracle) following frontier-AI lab disclosures, reframed cryptographic migration from a 2030s compliance project into immediate engineering work. As Cloudflare CEO Matthew Prince noted publicly after the briefings, “It is urgent to move encrypted systems to post-quantum (maybe more appropriately called post-AI) standards” and teams should “assume anything that uses RSA or Elliptic Curve cryptography” may face shortened timelines.
This engineering note sets out the concrete architecture and configuration baselines we apply across client SSH estates, Ubuntu and Windows OpenSSH servers, and Git/CI pipelines.
Separate forward-confidentiality key exchange (deploy hybrid ML-KEM immediately to stop Harvest Now, Decrypt Later) from identity & private keys (eliminate RSA < 3072, SHA-1 ssh-rsa and unrotated 256-bit-only dependencies, and replace static key sprawl with short-lived certificates and OIDC).
1. Primitive-level threat model: why private keys cannot wait
Waiting for public cryptanalytic papers fails whenever static public keys are already public. Unlike ephemeral session parameters, public keys for SSH hosts (known_hosts / DNS SSHFP), developer accounts (github.com/<user>.keys), signed Git commits and SAML metadata sit indexed indefinitely. Once an AI-assisted or quantum attack shortens key recovery against classical discrete-logarithm or factoring assumptions, any unrotated private key paired with an exposed public key becomes valid for impersonation immediately.
PP-26-4956 reflects two converging pressures:
- Quantum risk (Shor’s & Grover’s algorithms): Breaks RSA, finite-field Diffie-Hellman and all elliptic curves (
P-256,P-384,X25519,Ed25519) retroactively against captured traffic. - Post-AI / classical curve risk read between the lines of PP-26-4956: PP-26-4956 explicitly tells operators to inventory and flag DSA, EdDSA (
Ed25519), pairing-based cryptography, and elliptic curves other than P-384 or P-521 — puttingP-256,X25519andEd25519under immediate scrutiny while allowing RSA-3072+ and P-384 as temporary classical stopgaps en route to ML-KEM (FIPS 203) and ML-DSA (FIPS 204).
Hybrid (PQ + Traditional) design rule
During transition, hybrid algorithms (mlkem768x25519-sha256 for key exchange; ssh-mldsa44-ed25519 for authentication) combine a classical primitive with a NIST-standardised lattice primitive so both must fall for the session or signature to break:
| Primitive role | Legacy / flagged | Interim CNSA / forge bridge | Hybrid PQ / CNSA 2.0 target |
|---|---|---|---|
| SSH KEX | diffie-hellman-group14-sha256, ecdh-sha2-nistp256, curve25519-sha256 alone |
[email protected] |
mlkem768x25519-sha256 (default in OpenSSH 10.0+) |
| SSH host / user auth | ssh-rsa (SHA-1), ssh-dss, RSA-1024/2048, standalone unrotated ssh-ed25519 |
[email protected] (FIDO2), ecdsa-sha2-nistp384, rsa-sha2-512 (≥ 3072-bit) |
ssh-mldsa44-ed25519 (OpenSSH 10.6+) or short-lived SSH CA certs |
| TLS 1.3 transport | RSA key exchange, ECDHE P-256 only | TLS 1.3 + RSA-3072+ / P-384 cert | X25519MLKEM768 / SecP384r1MLKEM1024 + ML-DSA-87 / MTC |
| Symmetric / hash | 3DES, RC4, AES-128, SHA-1, MD5 | AES-256-GCM / ChaCha20-Poly1305, SHA-256 | AES-256-GCM, SHA-384 / SHA-512 |
2. OpenSSH 9.0 to 10.6: protocol timeline and the 10.6 key-rename pitfall
Understanding exact OpenSSH version behaviour prevents broken deployments across heterogeneous client and server fleets:
| OpenSSH version | Shipped on (typical) | Key security & PQ milestones | Operational gotcha |
|---|---|---|---|
| 8.9 | Ubuntu 22.04 LTS | Removed ssh-rsa default |
Zero PQ key exchange; vulnerable to HNDL |
| 9.0 | Debian 12, macOS Ventura+ | Added default hybrid [email protected] |
Pre-standard NTRU Prime; lacks NIST ML-KEM |
| 9.6 | Ubuntu 24.04 LTS | [email protected], RequiredRSASize |
Still lacks mlkem768x25519-sha256; OpenSSL 3.0 base |
| 9.9 / 10.0 | Early 2025 upstreams | Added & defaulted mlkem768x25519-sha256 |
Older Win32-OpenSSH / macOS clients fall back to classical KEX |
| 10.1 | Late 2025 / Homebrew | Client WarnWeakCrypto defaults to yes |
Emits SLDL warning on GitHub/GitLab/Ubuntu servers lacking PQ KEX |
| 10.2–10.3 | Ubuntu 26.04 LTS, OpenBSD 7.8–7.9 | mlkem768x25519-sha256 mature default |
Good server baseline; still lacks promoted ML-DSA host keys |
| 10.4–10.5 | Mid-2026 Homebrew / bleeding edge | Experimental [email protected] |
Vendor-suffixed keys incompatible with 10.6+ |
| 10.6 | Oct 2026+ OpenBSD / Homebrew | Promoted ssh-mldsa44-ed25519; server-side WarnWeakCrypto |
Crash hazard: sshd refuses to start if 10.4/10.5 @openssh.com keys remain configured |
The 10.4/10.5 to 10.6 upgrade crash
If an operator tested ssh-keygen -t [email protected] on OpenSSH 10.4 or 10.5 and upgraded to 10.6, the key type string changed to ssh-mldsa44-ed25519 with an updated wire encoding. Leftover @openssh.com host keys cause sshd to abort on startup (Could not load host key), and stale entries in known_hosts or authorized_keys fail verification. Always scrub experimental keys before upgrading and run sudo ssh-keygen -A && sudo sshd -t.
3. Production SSH baselines: Ubuntu, Windows and mixed clients
A. Server drop-in (/etc/ssh/sshd_config.d/99-pqc-hardening.conf)
Ubuntu 24.04 (OpenSSH 9.6) and Ubuntu 26.04 (OpenSSH 10.2+) load /etc/ssh/sshd_config.d/*.conf alphabetically. Note that on mixed fleets containing Ubuntu 24.04 servers, including [email protected] keeps PQ KEX active across both 24.04 and 26.04 until 24.04 hosts are upgraded or placed behind a 26.04 bastion:
# /etc/ssh/sshd_config.d/99-pqc-hardening.conf
KexAlgorithms mlkem768x25519-sha256,[email protected]
# Uncomment HostKey for OpenSSH 10.6+ hosts after running `sudo ssh-keygen -A`:
# HostKey /etc/ssh/ssh_host_mldsa44_ed25519_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKeyAlgorithms ssh-mldsa44-ed25519,ecdsa-sha2-nistp384,rsa-sha2-512,rsa-sha2-256
PubkeyAcceptedAlgorithms ssh-mldsa44-ed25519,[email protected],ecdsa-sha2-nistp384,rsa-sha2-512,rsa-sha2-256
# Reject legacy 1024/2048-bit RSA host and user keys outright
RequiredRSASize 3072
# Log weak classical fallbacks (OpenSSH 10.6+)
# WarnWeakCrypto yes
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin prohibit-password
AllowTcpForwarding local
X11Forwarding no
Ciphers [email protected],[email protected]
MACs hmac-sha2-512[email protected],hmac-sha2-256[email protected]
B. Client policy (~/.ssh/config)
Notice how RequiredRSASize 3072 behaves on clients: if a server presents an RSA-2048 host key, the OpenSSH client aborts the handshake immediately (the SSH protocol cannot renegotiate a host key mid-connection). Meanwhile, WarnWeakCrypto yes ensures operators see falling back to classical KEX rather than hiding HNDL risk:
Host *
KexAlgorithms mlkem768x25519-sha256,[email protected],ecdh-sha2-nistp384
RequiredRSASize 3072
WarnWeakCrypto yes
HostKeyAlgorithms ssh-mldsa44-ed25519,ecdsa-sha2-nistp384,rsa-sha2-512,rsa-sha2-256
PubkeyAcceptedAlgorithms ssh-mldsa44-ed25519,[email protected],ecdsa-sha2-nistp384,rsa-sha2-512,rsa-sha2-256
IdentitiesOnly yes
IdentityFile ~/.ssh/id_mldsa44_ed25519
IdentityFile ~/.ssh/id_ecdsa_p384
IdentityFile ~/.ssh/id_rsa_4096
# Per-host exception for tracked legacy gear scheduled for containment
Host legacy-san-01.internal
WarnWeakCrypto no-pq-kex
RequiredRSASize 2048
C. Windows OpenSSH (Win32-OpenSSH) pitfalls
Microsoft’s inbox OpenSSH binary under C:\Windows\System32\OpenSSH\ ships with Windows servicing cycles and routinely trails upstream PQ releases. Engineering teams supporting Windows developers or Windows servers should standardise three controls:
- Replace the client binary: Install current
PowerShell/Win32-OpenSSH(winget install Microsoft.OpenSSH.Beta) or execute SSH inside WSL2 (Ubuntu 26.04). - Override Git-for-Windows: Force Git to stop using its bundled MSYS2
ssh.exe:git config --global core.sshCommand "C:/Program Files/OpenSSH/ssh.exe". - Audit
administrators_authorized_keyson Windows servers: DefaultC:\ProgramData\ssh\sshd_configroutes members ofBUILTIN\Administratorsaway from%USERPROFILE%\.ssh\authorized_keysintoC:\ProgramData\ssh\administrators_authorized_keys, which silently rejects connections unless inherited permissions are stripped (icacls.exe ... /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F").
4. Crypto-agility via a short-lived SSH Certificate Authority (CA)
Static authorized_keys files across 40 servers and 25 developer laptops turn every cryptographic advisory into weeks of manual key rotation and orphan-key cleanup (especially in universities where RAs and contractors rotate yearly).
Moving SSH authentication to a short-lived SSH Certificate Authority backed by institutional OIDC/SAML makes algorithm upgrades a single-point CA change:
┌──────────────────────────────────────────────────────────────────────┐
│ STATIC AUTHORIZED_KEYS (BRITTLE) │
│ Laptop private key ──► copied to N servers' ~/.ssh/authorized_keys │
│ Result: rotating algorithm or offboarding requires N host edits │
└──────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────┐
│ SHORT-LIVED SSH CA + OIDC (CRYPTO-AGILE) │
│ │
│ 1. Developer authenticates via Campus SSO / OIDC (+ MFA) │
│ │ │
│ ▼ │
│ 2. SSH CA (Vault / step-ca / Teleport) mints 8-hour ephemeral cert │
│ • principal = user@org • signed with CA key (P-384 / ML-DSA) │
│ │ │
│ ▼ │
│ 3. Target Ubuntu/Windows servers trust ONLY `TrustedUserCAKeys` │
│ (plus `HostCertificate` so clients never rely on TOFU alone) │
└──────────────────────────────────────────────────────────────────────┘
In /etc/ssh/sshd_config.d/99-pqc-hardening.conf, add two lines:
TrustedUserCAKeys /etc/ssh/ca_user.pub
CASignatureAlgorithms ssh-mldsa44-ed25519,ecdsa-sha2-nistp384,rsa-sha2-512
When OpenSSH 10.6+ and ssh-mldsa44-ed25519 roll out across your server fleet, you rotate the CA signing keypair once — zero edits to individual user accounts on target machines, and leaked developer laptops lose access automatically after the 8-hour certificate expires.
5. Git infrastructure & software supply-chain integrity
Git interacts with cryptography in three distinct places, each requiring its own remediation:
1. Transport (git clone, fetch, push)
- GitHub: Serves
sntrup761x25519-sha512over[email protected]SSH automatically when the client supports it. Verify withssh -vv [email protected]. - GitLab (Self-Managed / Dedicated): Requires
gitlab-sshd>= 18.2.4 or host OpenSSH 9.9+ for PQ key exchange; older Omnibus builds trigger OpenSSH 10.1+WarnWeakCryptoalerts on developer workstations. - Self-hosted Gitea / Forgejo / internal mirrors: Built-in Go SSH daemons often lag OpenSSH PQ KEX. Either delegate SSH termination to host OpenSSH (
9.9+/10.2+) or standardise CI/developer traffic over HTTPS through a PQ TLS 1.3 proxy (X25519MLKEM768via Caddy 2.10+ or Nginx + OpenSSL 3.5+).
2. CI/CD identity: kill deploy keys and long-lived PATs
Static RSA-2048 repository deploy keys and unexpiring Personal Access Tokens are the highest-value targets in Git estates. Replace them with OIDC workload identity federation:
- GitHub Actions / GitLab CI -> Cloud (AWS / Azure / GCP / Cloudflare): Configure
id-token: writeand verify repository/branch claims (sub,environment) in IAM trust policies so zero long-lived private keys exist in repository secrets. - Cross-repo automation: Use short-lived GitHub App installation tokens scoped to specific repositories rather than machine-user SSH keys or personal PATs.
3. Commit & tag provenance (ssh-keygen -Y, Sigstore & Git SHA-256)
Git 2.34+ supports signing commits and tags using standard SSH keys (gpg.format ssh). However, a critical nuance emerges under post-AI / post-quantum threat models: if an adversary can break a classical P-256/RSA signature key in 2031, how do you know a commit claiming to be from 2026 was genuinely signed in 2026 before the key was broken?
- Today’s practical pairing: Use
gpg.format sshwith a hardware-backed FIDO2 or P-384 key, track active and historical keys in a versionedallowed_signersfile (valid-after/valid-beforetimestamps supported by OpenSSH!), and for release tags/artefacts pair signatures with Sigstore Rekor transparency-log timestamps or RFC 3161 trusted timestamps so signature validity is anchored to creation time. - Git SHA-256 repositories (
git init --object-format=sha256): Git’s SHA-256 object format addresses SHA-1 collision resistance rather than asymmetric RSA/ECC breaks, and ecosystem interoperability across forges, submodules and CI plugins remains incomplete in 2026. Keep SHA-1/SHA-256 migration plans separate from SSH/TLS post-quantum hardening.
6. Automated fleet & CI verification harness
Run this read-only verification script from a modern OpenSSH 10.6+ runner or bastion to catch classical KEX fallbacks, undersized RSA host keys and stale deploy/user keys across servers and Git endpoints:
#!/usr/bin/env bash
set -euo pipefail
# Usage: ./verify-pqc-ssh.sh bastion.example.org [email protected]
TARGETS=("$@")
if [ "${#TARGETS[@]}" -eq 0 ]; then
echo "Usage: $0 <ssh-target> [<ssh-target> ...]" >&2
exit 2
fi
FAIL=0
for target in "${TARGETS[@]}"; do
echo "=== Checking $target ==="
out=$(ssh -vv -o BatchMode=yes -o ConnectTimeout=6 \
-o StrictHostKeyChecking=accept-new \
-o RequiredRSASize=3072 \
-o WarnWeakCrypto=yes \
"$target" true 2>&1 || true)
kex=$(echo "$out" | grep -i "kex: algorithm:" | tail -n1 || true)
echo " KEX: ${kex:-unknown}"
if ! echo "$kex" | grep -qE "mlkem768x25519|sntrup761x25519"; then
echo " FAIL: non-post-quantum KEX negotiated on $target"
FAIL=1
fi
if echo "$out" | grep -qiE "WARNING:.*not using a post-quantum|RSA key.*too small"; then
echo " FAIL: weak crypto or undersized RSA host key detected on $target"
FAIL=1
fi
done
# Audit local or checked-in authorized_keys / allowed_signers for weak RSA or DSA
for keyfile in "${HOME}/.ssh/authorized_keys" ".config/git/allowed_signers"; do
[ -f "$keyfile" ] || continue
while IFS= read -r line; do
[[ -z "$line" || "$line" == \#* ]] && continue
bits=$(echo "$line" | ssh-keygen -lf - 2>/dev/null | awk '{print $1}' || echo "0")
algo=$(echo "$line" | ssh-keygen -lf - 2>/dev/null | awk '{print $NF}' || echo "")
if [[ "$algo" == "(DSA)" ]] || [[ "$algo" == "(RSA)" && "${bits:-0}" -lt 3072 ]]; then
echo " FAIL: weak key in $keyfile ($bits $algo)"
FAIL=1
fi
done < "$keyfile"
done
exit "$FAIL"
Pair this note with Crypto-Agility for Client Servers: Edge-to-Origin TLS, PKI, VPNs and Legacy Containment for web proxies, Campus Moodle/SSO, backups and legacy containment, or see our hands-on Step-by-Step Guide & Configurator.
Hardening your servers, SSH, Git or SSO?
We run cryptographic inventories (CBOM), rotate SSH, Git, TLS and campus Moodle/SSO keys for post-quantum and post-AI resilience, harden Ubuntu and Windows servers, and provide ongoing care plans with full handover.