Generate SSL certificates and keys

A small and helpfull collections of certificate and private key OpenSSL commands.

Generate private key without a password.

openssl genrsa -out privateKey.key 2048

Generate RSA private key with AES CBC 256 encryption

openssl genrsa -aes256 -out privateKey.key 2048

Generate RSA private key with DES encryption

openssl genrsa -des3 -out privateKey.key 2048

Remove passphrase from the private key

openssl rsa -in privateKey.key -out privateKey.key

Encrypt existing private key with DES pass phrase

openssl rsa -des3 -in privateKey.key -out privateKey_password.key

Encrypt existing private key with AES256 pass phrase

openssl rsa -aes256 -in privateKey.key -out privateKey_password.key