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
- Check the OpenSSL version
- Generate an elliptic curve key
- Create a certificate signing request
- Inspect a CSR
- Extract the public key
All keys and signing requests commands · OpenSSL 3 cheatsheet