ssh-keygen from Ed25519 OpenSSL pem private key

Viewed 1334

I would like to generate a public SSH key from an OpenSSL generated Ed25519 private key.

I tried:

ssh-keygen -t ed25519 -f ed25519_key -y > ed25519_ssh.pub

And got the error:

Load key "ed25519_key": invalid format
1 Answers

SSH and SSL are two things.

SSH means "Secure Shell" and is used for remotely connecting to another machine to issue commands, most likely via a CLI (Command Line Interface).

SSL means "Secure Sockets Layer", an older version of actual TLS, used to secure data transmission on a network.

To create SSL keys you can use openssl:

openssl genpkey -algorithm ed25519 -outform PEM -out ed25519_ssl.prv
openssl pkey -in ed25519_ssl.prv -pubout -out ed25519_ssl.pub
Related