OpenSSH 10.6 and later support the hybrid key type mldsa44-ed25519. Every signature consists of an ML-DSA-44 part and an Ed25519 part and is only valid if both check out.1 Servers running OpenSSH older than 10.6 don’t support the type, though, so the existing Ed25519 key can stay in the config as a fallback.
OpenSSH on macOS#
The OpenSSH bundled with macOS doesn’t support mldsa44-ed25519. Homebrew installs a current version:
brew install opensshAfterwards, ssh -V has to report at least OpenSSH_10.6, and which ssh has to point to /opt/homebrew/bin/ssh.
The macOS ssh-agent rejects the new key with “agent refused operation”. ~/.zshrc starts the Homebrew agent unless one is already running, and loads both keys:
export SSH_AUTH_SOCK=~/.ssh/agent.sock
ssh-add -l >/dev/null 2>&1
if [ $? -eq 2 ]; then
rm -f $SSH_AUTH_SOCK
/opt/homebrew/bin/ssh-agent -a $SSH_AUTH_SOCK >/dev/null
ssh-add ~/.ssh/id_mldsa44_ed25519 ~/.ssh/id_ed25519
fissh-add -l exits with status 2 when no agent is reachable. Every other shell uses the same agent. ssh offers keys from the agent in the order they were added, so ssh-add loads the hybrid key first.
Generating the key#
ssh-keygen -t mldsa44-ed25519The key ends up in ~/.ssh/id_mldsa44_ed25519. The public key goes into the server’s authorized_keys:
ssh-copy-id -i ~/.ssh/id_mldsa44_ed25519.pub host.example.comConfig#
~/.ssh/config:
Host client-01.example.com
User admin
Host *
User max-mustermann
IdentityFile ~/.ssh/id_mldsa44_ed25519
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
AddKeysToAgent yesssh offers the keys in the order of the IdentityFile lines. IdentitiesOnly yes limits the selection to these two keys, even if ssh-agent holds others. With AddKeysToAgent yes, a key is added to the agent on the first connection, and the passphrase isn’t asked for again while the agent is running.
The first matching value of each option wins, so blocks for individual hosts go before Host *. This way client-01.example.com uses the user admin and every other host uses max-mustermann. The keys apply to all hosts, because IdentityFile is the one option here that accumulates instead of being overridden.
Checking with ssh -G#
ssh -G prints the configuration that applies to a host without connecting:
ssh -G client-01.example.com | grep -E '^(user|identityfile|identitiesonly) 'user admin
identitiesonly yes
identityfile ~/.ssh/id_mldsa44_ed25519
identityfile ~/.ssh/id_ed25519If id_ed25519 comes first or other keys show up, a different block of the config applies to that host.
Checking with ssh -v#
ssh -v shows which key is offered and accepted during the connection. The command true closes the connection right after login:
ssh -v host.example.com true 2>&1 | grep -E 'Offering|Server accepts'A server running OpenSSH 10.6 accepts the hybrid key:
debug1: Offering public key: /Users/max-mustermann/.ssh/id_mldsa44_ed25519 MLDSA44-ED25519 SHA256:... explicit agent
debug1: Server accepts key: /Users/max-mustermann/.ssh/id_mldsa44_ed25519 MLDSA44-ED25519 SHA256:... explicit agentAn older server doesn’t list the type as supported. ssh then skips the hybrid key and logs in with Ed25519:
debug1: Offering public key: /Users/max-mustermann/.ssh/id_ed25519 ED25519 SHA256:... explicit agent
debug1: Server accepts key: /Users/max-mustermann/.ssh/id_ed25519 ED25519 SHA256:... explicit agentIn IR 8547 , NIST lists EdDSA, and with it Ed25519, as deprecated after 2030 and disallowed after 2035. On 2 December 2026, the NSA advised operators of National Security Systems to move to post-quantum cryptography immediately, after frontier AI companies disclosed findings that affect some cryptographic systems currently in use (press release , joint statement ). Whether the 2035 deadline still holds is an open question. ↩︎
Found this helpful?
Consider supporting via:
