certificates:remove_the_password_from_a_rsa_private_key
Differences
This shows you the differences between two versions of the page.
certificates:remove_the_password_from_a_rsa_private_key [2016/10/10 23:32] – created peter | certificates:remove_the_password_from_a_rsa_private_key [2019/11/26 21:52] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Certificates - Remove the password from a RSA private key ====== | ||
- | |||
- | To test whether the SSL certificate is password-protected, | ||
- | |||
- | <code bash> | ||
- | head -3 your.key | ||
- | </ | ||
- | |||
- | Result: | ||
- | |||
- | This private key is encrypted: | ||
- | |||
- | < | ||
- | -----BEGIN RSA PRIVATE KEY----- | ||
- | Proc-Type: 4,ENCRYPTED | ||
- | DEK-Info: AES-128-CBC, | ||
- | </ | ||
- | |||
- | This file is not encrypted: | ||
- | |||
- | < | ||
- | -----BEGIN RSA PRIVATE KEY----- | ||
- | MIIEowIBAAKCAQEAvbeWtO9nQP4cFFuhGrOM/ | ||
- | wwlDtT9tfo0tCC2ib9STfeM6AYrdI3wauzCu7AV4CFGSMP3HLX8DJuk8zzbdQHHv | ||
- | </ | ||
- | |||
- | To remove the password from a RSA private key, use the following command: | ||
- | |||
- | <code bash> | ||
- | umask 077 | ||
- | mv your.key old-with-pass.key | ||
- | openssl rsa -in old-with-pass.key -out your.key | ||
- | </ | ||
- | |||
- | The **umask 077** command is necessary to ensure that the new key is not created with overly relaxed permissions. | ||
certificates/remove_the_password_from_a_rsa_private_key.1476142337.txt.gz · Last modified: 2020/07/15 09:30 (external edit)