Engineering Notes September 16, 2016 1 min read

Generating RSA Keys using OpenSSL command line

Generate 2048 bit private-public key pair openssl genrsa -des3 -out private.pem 2048 You will be prompted for a passphrase for private key, make sure you…

SA
Sameer Karmarkar

Generate 2048 bit private-public key pair

openssl genrsa -des3 -out private.pem 2048

You will be prompted for a passphrase for private key, make sure you remember the passphrase you use.

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

If you want unencrypted private key, you can get it with the following command (optional)

openssl rsa -in private.pem -out private_unencrypted.pem -outform PEM

Official OpenSSL docs reference

Ready to learn more?

Get in touch with our team to see how we can help.

Avant Insights — Blog — Agent View
/blog/generating-rsa-keys-openssl/
# Generating RSA Keys using OpenSSL command line

Generate 2048 bit private-public key pair openssl genrsa -des3 -out private.pem 2048 You will be prompted for a passphrase for private key, make sure you…

Author: Sameer Karmarkar
Date: September 16, 2016
Category: Engineering Notes
Reading Time: 1 min

---

# Generating RSA Keys using OpenSSL command line

Generate 2048 bit private-public key pair openssl genrsa -des3 -out private.pem 2048 You will be prompted for a passphrase for private key, make sure you…