Invalid PEM Data Received for Private Key – NSX Edge

Problem

 

When attempting to import an SSL certificate into an NSX Edge firewall I got the following error:

Invalid PEM data received for private key

 

cert_error1

 

Resolution

The private key was in PKCS#8 which is not a valid type for import. Export it to PKCS#1 using the following command:

openssl rsa -in original.key -out new.key

You should then be able to iimport successfully