Search code examples
apacheubuntussl

How do I get the private key for a GoDaddy certificate so I can install it on Ubuntu 14+?


The cert I have from StartSSL comes with a key file. But from GoDaddy, I get only the 2 .crt files. GoDaddy's instructions are for CentOS and explicitly do not work for Ubuntu.

How do I export the private key ... or get it from somewhere ... so I can use it with Apache SSL? The question that is ALMOST the same as mine assumes use of a Mac Keychain application. I don't run a Mac and I'm trying to do everything on the Ubuntu command line. I know there's a way to do this ... can anyone help me find it?

Thanks!


Solution

  • Follow this steps.

    1. First of all Generate the Private key and CSR using the following command.

      openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
      

      You'll be asked the questions like the Country, State, City, Company Name, Domain name and all. Just fill up the details and your Private key will be ready as server.key in the directory you are going to run this command.

      You'll be asked to enter Challenge Password, You can enter any secure Password in there.

    2. Login into GoDaddy and ReKey the Certificate, You'll have to Submit the CSR we've generated with the Private Key.

    Once you'll Rekey the Certificate, you'll be able to Install the certificate using the crt file you got, ca-bundle you got and the Private key we just made!

    Let me know if you have any questions about this.

    PS: You have to use this method when you lose your Private key.