• 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.

Plesk Certificate CLI Tool Question

Chris1

Regular Pleskian
Hello,

I am writing a bash script to loop through a number of domains using old default SSL certificates to use a new specific certificate.

I've read the documentation however there doesn't appear to be an option to assign a certificate to a domain.

The --assign-cert option seems to say what I want to do but it doesn't work.

To assign the SSL certificate named Site Certificate (from the administrator's repository) on example.com for use with IP address 192.0.2.78:

plesk bin certificate --assign-cert "Site Certificate" -admin example.com -ip 192.0.2.78

I tried doing this:

Code:
plesk bin certificate --assign-cert "New Certificate" -admin clientdomain.com -ip 111.111.111.111

But it comes up with this error:

Code:
Unknown option 'clientdomain.com': /usr/local/psa/bin/certificate --assign-cert New Certificate -admin clientdomain.com -ip 111.111.111.111


exit status 1

http://docs.plesk.com/en-US/12.5/cl...utilities/certificate-ssl-certificates.39009/

Is it possible to assign a new certificate to a clients domains via the CLI tool?
 
@Chris1

If I am not mistaken, you should replace "-admin" flag with "-domain":

plesk bin certificate --assign-cert "New Certificate" -domain clientdomain.com -ip 111.111.111.111

Hope this helps.

Regards
 
Hi @trialotto

Thank you for the reply.

Unfortunately that doesn't work either. The flag "-admin" is required to specify which repository the certificates resides in.
 
Looks like there is mistake in documentation. Look at the output of --help option:

Usage: certificate command <cert_name> [-domain <name>|-admin] [options]

As you can see you can use -domain <name> OR -admin parameters. There is clarification:

-domain <domain_name> Domain repository
-admin Administrator repository
 
Hi @IgorG

Thank you for the reply.

Unfortunately this doesn't help, I know about those parameters as I read the documentation.

Is there a way to apply an SSL certificate from the server repository to a specific domain?
 
Back
Top