1. Log in to your old server as the root user.
2. Find the .crt and .key files of your domain’s SSL certificate. You can use the following commands to find the files:
find / -name '*.crt' find / -name '*.key'
3. Generally, these two files will be located under the following path:
/etc/ssl/
4. So, the full file name should be as follows:
/etc/ssl/certs/YOUR_DOMAIN_NAME.crt /etc/ssl/private/YOUR_DOMAIN_NAME.key
5. Now, you need to run the following command to export the SSL:
- openssl pkcs12 -export -out OUTPUT_FILENAME -inkey KEY_FILENAME -in CERTIFICATE_FILENAME
- The parameters should be:
- OUTPUT_FILENAME: File name with full path for generating file.KEY_FILENAME : Full path of .key file (i.e. : /etc/ssl/private/DOMAIN.key).
- CERTIFICATE_FILENAME: Full path of .crt file (i.e.: /etc/ssl/certs/DOMAIN.crt).
6. You will be asked to set a password for your file. Enter the password and re-enter it to confirm that password. This will create the .pfx file at the given path.
7. Download this .pfx file to another server on which you want to install this certificate.
Notes:- These steps are performed on CentOS 5.6. For other Linux-based distributions, it would be similar.
- These steps can only be performed if you have root access to your VPS Hosting/Dedicated Server.
→ Looking to import an SSL Certificate on Apache? Please refer to import SSL on Apache for more details.
→ Looking to install an SSL Certificate on WHM/cPanel? Please refer to install SSL on cPanel/WHM for more details.