`ssh-keygen` does not generate ed25519 key with pem format

Damien Miller djm at mindrot.org
Tue Jul 7 19:23:11 AEST 2026


On Tue, 7 Jul 2026, Darren Rambaud via openssh-unix-dev wrote:

> 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
> ```

It's not implemented, see the KEY_ED25519 in sshkey.c's
sshkey_private_to_blob_pem_pkcs8()

Maybe it's possible using PEM_write_bio_ECPrivateKey() but I'm not 100%
sure that's the correct API.

-d


More information about the openssh-unix-dev mailing list