How to generate a pair of RSA private and public key in Linux?

How to generate a pair of RSA private and public key in Linux?

To generate an RSA private key:

openssl genrsa -out private.pem 2048

To generate the RSA public key from the RSA private key:

openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Leave a Reply

Your email address will not be published. Required fields are marked *