Adapt the command with yourprivatekey.txt (the path to your private key file), yourSSLcertificate.crt (the path to your SSL certificate) and intermediate.crt (the path to your intermediate certificate).

Import your SSL certificate

Once you have your .pfx file, run the following command to get the private key file:
openssl pkcs12 -in SSL247Backup.pfx -out privatekey.txt -nodes