OpenSSL Removing a Pass-Phrase from a Private Key

From UNIX Systems Administration
Jump to navigation Jump to search

Removing a Pass-Phrase from a Private Key

  1. If required follow the OpenSSL Generating a Private Key procedure.
  2. Create a backup of the original key with the pass-phrase.
    1. # cp <key_name>_passphrase.key <key_name>_passphrase.key.bk
  3. Remove the pass-phrase from the private key.
    1. # openssl rsa -in <key_name>_passphrase.key -out <key_name>.key
  4. Enter the information as required by the prompts.
  5. Verify the checksum of the key matches the checksum of the key with the pass-phrase.
    1. # openssl rsa -noout -modulus -in <key_name>.key | openssl md5
    2. # openssl rsa -noout -modulus -in <key_name>_passhrase.key | openssl md5

Further Reading

  1. How to Generate SSL key, CSR, and Self Signed Certificate for Apache