OpenSSH · macOS · Linux · Windows · GitHub
A Quick Guide to Upgrading Your GitHub SSH Keys for Post-Quantum Cryptography
OpenSSH is ready for post-quantum key exchange, and GitHub now supports it. OpenSSH has supported post-quantum key agreement to prevent “store now, decrypt later” attacks for several years, and it has been the default since OpenSSH 9.0, released in 2022.
For many developers, GitHub is where SSH keys become an explicit part of daily work. Post-quantum key exchange protects the connection without replacing the existing authentication key.
OpenSSH 10.6 also introduces hybrid authentication using ML-DSA-44 combined with Ed25519. Moving to that key type means generating and uploading a replacement, which is straightforward once the steps are clear but hardly intuitive for anyone who does not live in the security world. GitHub has yet to document that new authentication key type as supported.
Check your SSH client
ssh -V
OpenSSH 9.9 or newer can use GitHub's ML-KEM key exchange. OpenSSH 10.6 or newer is required to generate the final mldsa44-ed25519 authentication key format.
macOS
Install or upgrade the Homebrew build:
brew install openssh
brew upgrade openssh
Put the Homebrew binaries first for the current shell, then verify the version:
export PATH="$(brew --prefix openssh)/bin:$PATH"
ssh -V
Linux
Use your distribution package when it provides OpenSSH 10.6 or newer.
# Fedora 45
sudo dnf install openssh openssh-clients
# Arch Linux
sudo pacman -Syu openssh
# Debian Sid
sudo apt update
sudo apt install openssh-client
Ubuntu 26.10 provides OpenSSH 10.5. Verify the installed version before attempting hybrid key generation. Avoid replacing a distribution-managed SSH server solely for this experiment.
Windows
Check the native client from PowerShell:
ssh -V
Microsoft's current Win32 OpenSSH preview is based on 10.4. It does not generate the final 10.6 key format. Use a WSL environment with OpenSSH 10.6 or newer for the authentication experiment.
wsl
ssh -V
OpenSSH 10.6 removed the experimental vendor suffix. Keys generated by the earlier experimental implementation must be regenerated.
Enable post-quantum key exchange
OpenSSH 9.9 made mlkem768x25519-sha256 available by default. OpenSSH 10.0 made it the preferred key exchange. GitHub negotiates it automatically with a compatible client.
To place it first explicitly, edit ~/.ssh/config on macOS, Linux, or WSL. Native Windows OpenSSH reads %USERPROFILE%\.ssh\config.
Host github.com
HostName github.com
User git
KexAlgorithms ^mlkem768x25519-sha256
This changes key exchange only. Your existing Ed25519, ECDSA, or RSA authentication key continues to identify you to GitHub.
Verify post-quantum key exchange
On macOS, Linux, or WSL, run:
ssh -vT git@github.com 2>&1 | grep 'kex: algorithm'
In PowerShell, run:
ssh -vT git@github.com 2>&1 |
Select-String 'kex: algorithm'
Look for:
debug1: kex: algorithm: mlkem768x25519-sha256
Generate an experimental hybrid authentication key
Continue only with OpenSSH 10.6 or newer. On macOS, Linux, or a compatible WSL distribution, replace the email address with the one associated with your GitHub account:
ssh-keygen -t mldsa44-ed25519 -C "you@example.com"
Accept the default file location and set a strong passphrase. The command creates:
~/.ssh/id_mldsa44_ed25519(private key)~/.ssh/id_mldsa44_ed25519.pub(public key)
Copy your public key
macOS
pbcopy < ~/.ssh/id_mldsa44_ed25519.pub
Linux
Wayland:
wl-copy < ~/.ssh/id_mldsa44_ed25519.pub
X11:
xclip -selection clipboard \
< ~/.ssh/id_mldsa44_ed25519.pub
You can always print the key and copy it manually:
cat ~/.ssh/id_mldsa44_ed25519.pub
Windows with WSL
cat ~/.ssh/id_mldsa44_ed25519.pub |
clip.exe
If a future native Windows release generates the key, PowerShell can copy it:
Get-Content "$env:USERPROFILE\.ssh\id_mldsa44_ed25519.pub" |
Set-Clipboard
Try adding the public key to GitHub
- Navigate to GitHub SSH and GPG keys.
- Click New SSH key.
- Enter a descriptive title, such as
Post-Quantum SSH Test. - Select Authentication Key.
- Paste your public key.
- Click Add SSH key.
Test and configure the new key after GitHub accepts it
On macOS, Linux, or WSL, test the private key explicitly:
ssh -T -o IdentitiesOnly=yes \
-i ~/.ssh/id_mldsa44_ed25519 git@github.com
For a future native Windows OpenSSH 10.6 or newer release, use PowerShell:
ssh -T -o IdentitiesOnly=yes `
-i "$env:USERPROFILE\.ssh\id_mldsa44_ed25519" `
git@github.com
Successful authentication returns a message confirming your GitHub username. Only then should you add the identity to the GitHub entry in your SSH configuration:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_mldsa44_ed25519
IdentitiesOnly yes
KexAlgorithms ^mlkem768x25519-sha256
Retire your old SSH key only after migration succeeds
Keep your existing authentication key while GitHub rejects the hybrid key. Once the new key works for a fresh SSH connection, return to your GitHub SSH key settings and revoke the old key.