OpenSSL 3 · Keys and signing requests

Generate an RSA private key

Create a 2048-bit RSA key.

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out private.key

Caution: Keep private keys secret and restrict their permissions, for example chmod 600.

Official OpenSSL 3 documentation

More keys and signing requests commands

All keys and signing requests commands · OpenSSL 3 cheatsheet

Was this page helpful?