When uploading an SSL certificate to Plesk, the operation fails with the error message:
PLESK_ERROR: Unable to set the private key: Probably, the private key format is invalid
Private Key in the .key file contains the following string:
-----BEGIN ENCRYPTED PRIVATE KEY----
The Certificate Private Key part is encrypted.
Connect to the Plesk server via SSH.
Upload the .key file to the server.
Decrypt the .key file using the
# openssl rsa -in my_encrypted.key -out my_decrypted.key
- my_encrypted.key – is an uploaded file from step 2
- my_decrypted.key – a decrypted file that will be created
Note: To decrypt the key, a passphrase that was entered upon creating the key is required. It will be requested by
Use the new decrypted .key file (In this example, my_decrypted.key) to upload an SSL certificate in Plesk.