How to decrypt a password protected RSA private key?

I got a password protected RSA private key with headers like (I have the password):

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,...

How to decrypt a password protected RSA private key?

asked Feb 8, 2015 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

You can use the openssl command to decrypt the key:

openssl rsa -in /path/to/encrypted/key -out /paht/to/decrypted/key

For example, if you have a encrypted key file ssl.key and you want to decrypt it and store it as mykey.key, the command will be

openssl rsa -in ssl.key -out mykey.key
answered Feb 8, 2015 by Eric Z Ma (44,280 points)
edited Feb 8, 2015 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...