How to extract the public key from a certificate . pem to use with openssh

Asked

Viewed 207 times

-1

I have a private key rsa formatted as PEM issued by Amazon’s key generation service (AWS). I need to extract the public key from the private key to use in the file ~/.ssh/authorized_keys in other instances.

How do I extract the public key by taking the private key?

1 answer

0


To extract the public key, use the command ssh-keygen as below:

ssh-keygen -f chave_privada.pem -y > chave_publica.pub

Browser other questions tagged

You are not signed in. Login or sign up in order to post.