How to Generate a SSL CSR on Linux

We can create CSR using the single command like below. But make sure you have installed OpenSSL package on your system. The below command will first create a private key and then generate CSR. This command will also require few details as input.

sudo yum install openssl ( Redhat based systems )
sudo dnf install openssl ( Fedora based systems )
sudo apt install openssl ( Debian based systems )

run the following command to generate the CSR required.

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

Complete the required fields and pay attention to the FQDN as this needs to match the hostname where the SSL is intended to be installed.

You can opt to skip the passphrase

Once the CSR has been generated you should see some text that looks like below, this is your CSR.

 

-----BEGIN CERTIFICATE REQUEST-----
MIICzTCCAbUCAQAwgYcxCzAJBgNVBAYTAlpBMRMwEQYDVQQIDApTb21lLVN0YXRl
MSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxHDAaBgNVBAMME3N1
cGVyLnRlbXB1cmwuY28uemExIjAgBgkqhkiG9w0BCQEWE3RzaGlmZm1hbkBnbWFp
bC5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGpa34/icQTxKt
RigDv1Bja7a92LmlldHZShhLT00AKy7HELsPDDtRCi6A8LCxm2z4eRGqP/K12MPI
InBdcWG2i5zTfWhVj9AJkMbP/7MImq6tFK4H8UgqTZ9/vGxfKQDCCryNoEMJj/qg
EuHL7q7npAsUT8CucoGFNkLFYy45sXJm0D1QhTIVKFt3emofFRQWKLT4q8E9kXMH
GFdAxnuJKmjCWIxQFEcgaTzxIRnMXN1kPzsP0Txs8aRSyMmVuV349kZoJkQc+1Ma
6z1pBkCqqjhU3NX6xtaUPuOdnrBPZWY4TBMvVAjANteQEMYGSoYHyAjcmAdcGLgz
ClWRVjeBAgMBAAGgADANBgkqhkiG9w0BAQsFAAOCAQEADxZ4TpZE89eLuiuJIJzW
i5Hz7Q/G84Ha7cJoxc1X27H7TBDjF62l8iOLvjFsiankyzuKUNcYGIl/NvnUsGXq
t2GvancEWyhkUceC1Z0UisBtgFfSpEAtp3o8QWVCH/SMy9eFmbaAUGBG4gMTWO9H
AKwKCnVspZ0i1WiKPNjUiuzoc/8dcRRMf/ILK8H6crsvWMSB2dv6HrtuZX78GxnZ
/VvFGW05Ffsubt2PyGJF09DtLZ/Y4Bq6OtutNJ7bNBVHPiNEOUnhvOpBKcyyro9z
VjVpBpv+7G4Ui9ud60wxHJPPuipGaV9WFfC/HpGEF55ly+/NGeKvMdbC98hWWAgK
XA==
-----END CERTIFICATE REQUEST-----

 

  • SSL, CSR
  • 78 Users Found This Useful
Was this answer helpful?

Related Articles

How to reboot your Linux VPS

How to reboot your VPS. Login to your client area dashboard Click on Services Proceed to...

How to access my noVNC Console

How to access your noVNC console - Linux VPS. Login to your client area dashboard Click on...

Quick-Start Guide to Using PuTTY

How to Connect PuTTY Launch the PuTTY SSH client, then enter your server’s IP and SSH Port....

Managing rDNS

1.  Log in to the client portal 2.  Click on 'Domains' 3.  Click on 'Manage DNS'   4....