certificate: SSL Certificates
The certificate
utility is used to manage SSL certificates through CLI. By using this utility, you can perform the following tasks:
- creating and removing SSL certificates
- assigning certificates to IP addresses
- editing certain certificate parameters
Usage
certificate <command> <certificate name> [<domain name>] [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
Example
The following command creates the SSL certificate named Site Certificate in domain's certificate repository for domain example.com
by using private key file /usr/local/keys/keyfile.key,
corresponding certificate file /usr/local/cert/certfile.cert,
CA certificate file /usr/local/cert/cacert.cert
, and associates the corresponding certificate signing request file usr/local/requests/csreq.csr
with the certificate in Plesk:
plesk bin certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file /usr/local/cert/cert.cert -cacert-file /usr/local/cert/cacert.cert -csr-file /usr/local/requests/csreq
Commands
Command | Parameter | Description | Example |
---|---|---|---|
|
|
Creates an SSL certificate in a specified certificate repository (administrator's or domain's repository) by using a private key file and a corresponding certificate file. For information on the options required by the command, refer to the Note below the table. |
To create the SSL certificate named Site Certificate in domain's certificate repository for the domain example.com by using private key file plesk bin certificate --create "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file /usr/local/cert/certfile.cert or plesk bin certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file /usr/local/cert/certfile.cert |
|
|
Updates an existing SSL certificate's parameters. |
To rename the SSL certification domain example.com from Site Certificate to New Certificate: plesk bin certificate --update "Site Certificate" -domain example.com -new-name "New Certificate" or plesk bin certificate -u "Site Certificate" -domain example.com -new-name "New Certificate" |
|
|
Deletes an SSL certificate from administrator's or domain's repository. |
To delete the SSL certificate named Site Certificate from domain example.com: plesk bin certificate --remove "Site Certificate" -domain example.com or plesk bin certificate -r "Site Certificate" -domain example.com |
|
|
Assigns an SSL certificate for use with a specific IP address. Requires the |
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 or plesk bin certificate -ac "Site Certificate" -admin example.com -ip 192.0.2.78 |
|
|
Displays the list of SSL certificates stored in a specified certificate repository (administrator's or domain's repository). |
To view the list of SSL certificates existing in the certificates repository on the domain example.com: plesk bin certificate --list -domain example.com or plesk bin certificate -l -domain example.com |
|
|
Displays help on the use of the utility. |
To view help on the use of the certificate utility: plesk bin certificate --help or plesk bin certificate -h |
Note: The --create
command requires concomitant use of one of the following combinations of options: * -csr-file <file name> -key-file <file name>
* -csr-file <file name> -key-file <file name> -cert-file <file name>
* -csr-file <file name> -key-file <file name> -cert-file <file name> -cacert-file <file name>
* -key-file <file name> -cert-file <file name> -cacert-file <file name>
* -key-file <file name> -cert-file <file name>
Options
Option | Parameter | Description | Example |
---|---|---|---|
|
|
Specifies a particular domain's certificate repository in Plesk as the location of a certificate. |
To delete the SSL certificate named Site Certificate from example.com certificate repository: plesk bin certificate -r "Site Certificate" -domain example.com |
|
|
Specifies the administrator's certificate repository in Plesk as the location of a certificate. |
To delete the SSL certificate named Site Certificate from administrator's certificate repository: plesk bin certificate -r "Site Certificate" -admin |
|
|
Sets an SSL certificate as the default certificate. Used to set administrator's default certificate only. Used with the |
To set the SSL certificate named Site Certificate in the administrator's certificate repository in Plesk as the administrator's default certificate: plesk bin certificate -u "Site Certificate" -admin -default |
|
|
Renames an existing SSL certificate. |
To rename the SSL certificate in the administrator's certificate repository in Plesk from Site Certificate to Old Site Certificate: plesk bin certificate -u "Site Certificate" -admin -new-name "Old Site Certificate" |
|
|
Specifies a path to a private key file on the Plesk server to be used for certificate creation. Used with the Required with the |
To create the SSL certificate named Site Certificate in example.com certificate repository by using private key file plesk bin certificate -c "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file /usr/local/cert/certfile.cert -cacert-file /usr/local/cert/cacert.cert -csr-file /usr/local/requests/csreq
|
|
|
Specifies the path to an SSL certificate file on the Plesk server to be used for certificate creation. Used with the Required by the |
|
|
|
Specifies a path to the CA certificate file on the Plesk server to be used for an SSL certificate creation in Plesk. Used with the |
|
|
|
Specifies a path to a certificate signing request file on the Plesk server and associates the certificate signing request with the certificate to be created in Plesk. |
|
|
|
Specifies an IP address to which an SSL certificate is to be assigned. Used with the Required by the |
To assign the SSL certificate named Site Certificate from the example.com domain's repository for use with IP address 192.0.2.78: plesk bin certificate --assign-cert "Site Certificate" -domain example.com -ip 192.0.2.78 or plesk bin certificate -ac "Site Certificate" -domain example.com -ip 192.0.2.78 |