Generate a private and a public certificate

  1. Open your preferred CLI.

  2. In your CLI, navigate to the directory in which you want to save the certificates.

  3. To create a private and a public certificate, paste this command in your CLI and press Enter.

    Copy

    openssl genrsa -out private.pem 2048
    openssl req -new -x509 -key private.pem -out public.cer -days 1825
  4. You will be asked to enter some details about your organisation for the certificate's "Distinguished Name". Make sure that this information is correct as we monitor this and you may need to resubmit a certificate with the correct information. The prompts below will appear line by line:

    Copy

    Country Name (2 letter code) []:
    State or Province Name (full name) []: 
    Locality Name (eg, city) []:
    Organization Name (eg, company) []:
    Organizational Unit Name (eg, section) []:
    Common Name (eg, fully qualified host name) []:
    Email Address []:

You should now have two files: private.pem and public.pem.

Last updated

Was this helpful?