How to generate CSR in Linux server

Creating a CSR – Certificate Signing Request in Linux

To create a CSR, you need the OpenSSL command line utility installed on your system, otherwise, run the following command to install it.

$ sudo apt install openssl  [On Debian/Ubuntu]
$ sudo yum install openssl  [On CentOS/RHEL]
$ sudo dnf install openssl  [On Fedora]

Then issue the following command to generate a CSR and the key that will protect your certificate.

$ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr

where:

  • req enables the part of OpenSSL that handles certificate requests signing.
  • -newkey rsa:2048 creates a 2048-bit RSA key.
  • -nodes means “don’t encrypt the key”.
  • -keyout example.com.key specifies the filename to write on the created private key.
  • -out example.com.csr specifies the filename to write the CSR to.

Answer correctly, the questions you will be asked. Note that your answers should match information in legal documents regarding the registration of your company. This information is critically checked by the CA before issuing your certificate.

 

Generate CSR in Linux

 

After creating your CSR, view the contents of the file using a cat utility, select it and copy it.

$ cat example.com.csr

Copy CSR Key

Copy CSR Key

Then go back to your CA’s website, log in, go to the page will contain the SSL certificate you purchased, and activate it.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 5833