• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved certificate.exe command line issue with Private key

WindowsSysadmin

New Pleskian
Hi Team,

I'm having a spot of trouble using the command line option to import a certificate into plesk:

PS C:\Program Files (x86)\Plesk\bin> .\certificate.exe --create "star.mycertificate.co.nz_2018" -admin -default -key-file $keyfile -cert-file $certfile -cacert-file $intermediaryfile
Unable to create certificate "star.mycertificate.co.nz_2018": Unable to set the private key: Probably, the private key format is invalid.

PS C:\Program Files (x86)\Plesk\bin> $keyfile
c:\pleskinstaller\star.mycertificate.co.nz.key

My Private Key looks like this:

-----BEGIN RSA PRIVATE KEY-----
myprivatekeydata
-----END RSA PRIVATE KEY-----

Now, I've deleted and re-created the file using various notepad editors and copied the Private key carefully. So to test - I opened up the Plesk Panel, opened my star.mycertificate.co.nz.key file - Ctrl-A, Ctrl-C, and pasted that directly into the Plesk Panel (along with the Cert and CA cert) - hit upload and hey presto! the Certificate is imported successfully. Seeing as the same data is parsed successfully by the Panel and imported without error, this leads me to believe there is a bug in the certificate.exe CLI option.

OS is Windows Server 2016 - the commands above are being invoked from within a Powershell Session, however I have been using a Powershell Session to leverage the other Plesk CLI utilities for Windows without issue.

Can you please advise?
 
Bump - Anyone?

I should also note that the Certificate is a wildcard cert so *.domainname.co.nz

If there is a log that you can point me to, where a more detailed error message is, that would also be helpful
 
So this is partially solved - it seems that the default encoding format for Powershell out-file is unicode. Plesk seems to throw it's toys out the cot unless the format is ASCII

In which case, it would be nice if the parser checked the encoding format and outputted an error that was a little bit more helpful
 
Back
Top