`ssh-keygen` does not generate ed25519 key with pem format
Darren Rambaud via openssh-unix-dev <[email protected]> Tue, 7 Jul 2026 01:57:04 -0500
| Newsgroups | gmane.network.openssh.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi -- Using `10.3p1` release: ``` # ssh -V OpenSSH_10.3p1, OpenSSL 3.6.2 7 Apr 2026 ``` I am trying to generate a public/private key pair with this command: ``` ssh-keygen -f ./openssh103p1 -t ed25519 -N '' -m 'PEM' ``` However, it fails to generate a public/private key pair due to: ``` Generating public/private ed25519 key pair. Saving key "./openssh103p1" failed: invalid format ``` Using nix, I built the latest release, 10.4p1, however result is the same: ``` # ssh -V OpenSSH_10.4p1, OpenSSL 3.6.2 7 Apr 2026 # ssh-keygen -f ./openssh104p1 -t ed25519 -N '' -m 'PEM' Generating public/private ed25519 key pair. Saving key "./openssh104p1" failed: invalid format ``` It works n the `10.2p1` and `10.1p1` (and earlier?) releases: ``` # ssh -V OpenSSH_10.2p1, OpenSSL 3.6.2 7 Apr 2026 # ssh-keygen -f ./openssh102p1 -t ed25519 -N '' -m 'PEM' Generating public/private ed25519 key pair. Your identification has been saved in ./openssh102p1 Your public key has been saved in ./openssh102p1.pub The key fingerprint is: SHA256:dFq24FF9/NVePbIKtD9yvJSoMUTjefjm0ilNXr/BMXE darren@machine The key's randomart image is: +--[ED25519 256]--+ | .... +----[SHA256]-----+ # ssh -V OpenSSH_10.1p1, OpenSSL 3.6.2 7 Apr 2026 # ssh-keygen -f ./openssh101p1 -t ed25519 -N '' -m 'PEM' Generating public/private ed25519 key pair. Your identification has been saved in ./openssh101p1 Your public key has been saved in ./openssh101p1.pub The key fingerprint is: SHA256:8yuY3zLEWairs1CVaUcY/imCxfVdZeJ2ru55I02HMEc bldr@bldr The key's randomart image is: +--[ED25519 256]--+ | ... +----[SHA256]-----+ ``` The above results are repeatable across `aarch64-darwin`, `x86_64-linux`, and `aarch64-linux` platforms. I checked the past 2 release notes and I don't see any indication that this should have changed. Darren