- Login to your old server as root user.
- Find .crt and .key files of your domain’s SSL certificate. You can use following commands for finding the files:
find / -name '*.crt' find / -name '*.key'
- Generally, these two files will be located under following path:
- So, the full file name should be as follows:
- Now, you need to run following command to export the SSL:
- openssl pkcs12 -export -out OUTPUT_FILENAME -inkey KEY_FILENAME -in CERTIFICATE_FILENAME
- 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).
- 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.
- Download this .pfx file to another server in which you want to install this certificate.
→ Looking to import SSL Certificate on Apache? Please refer to import SSL on Apache for more details.
→ Looking to install SSL Certificate on WHM/cPanel? Please refer to install SSL on cPanel/WHM for more details.