Converting public SSH host key to SSL PEM format.

Stugots

Supreme [H]ardness
Joined
Feb 25, 2004
Messages
7,255
Does anyone know how to convert an OpenSSH public host key to OpenSSL PEM format?

I have an application that is trying to do host key validation and it will only accept keys in OpenSSL PEM format, even for OpenSSH connections.
 
I've seen that page, and I've been using the "ssh-keygen -f ssh_host_rsa_key.pub -e -m pem" command referenced there. But I wasn't 100% sure if this was what I needed or not.
 
Last edited:
This is the command that I needed.

openssl req -new -x509 -key ssh_host_rsa_key -out ssh_host_rsa_cert.pem -days 3652
 
Back
Top