Home » SSL » Generating a Certificate Signing Request (CSR) using OpenSSL

Generating a Certificate Signing Request (CSR) using OpenSSL

This articles will tell you that how to generate a Certificate Signing Request (CSR) using OpenSSL
A CSR is a file contain your certificate application information, including your Public Key. Generate your CSR and then copy and paste the CSR file into the web form in the enrollment process:
Generate keys and certificate:
To generate a pair of private key and public Certificate Signing Request (CSR) for a domain use the following command for Generating a Certificate Signing Request

#openssl req -nodes -newkey rsa:2048 -keyout linuxpcfix.com.key -out linuxpcfix.com.csr

This creates a two files. One of linuxpcfix.com.key contains a private key; do not disclose this file to anyone.
You will now be asked to enter details to be entered into your CSR.

Country Name (2 letter code) [AU]: IN
State or Province Name (full name) [Some-State]: Rajasthan
Locality Name (eg, city) []: City Name
Organization Name (eg, company) [Internet Widgits Pty Ltd]: Company Name
Organizational Unit Name (eg, section) []: IT
Common Name (eg, YOUR name) []: mydomain.linuxpcfix.com
Email Address []:admin@linuxpcfix.com

Please enter the following ‘extra’ attributes to be sent with your certificate request
A challenge password []:
An optional company name []:
Use webserver name as Common Name (CN). If the domain name (Common Name) is Linuxpcfix.com append the domain to the hostname (use the fully qualified domain name).
Your CSR now created. open the linuxpcfix.com.csr in a text editor and copy and paste the contents into the online enrollment form of your registrar website.
on the other hand one may issue the following command to generate a CSR:
openssl req -nodes -newkey rsa:2048 -nodes -keyout linuxpcfix.com.key -out linuxpcfix.com.csr
-subj “/C=IN/ST=Raj/L=cityname/O=CompanyName/OU=IT/CN=mydomain.linuxpcfix.com.com”

About

I am founder and webmaster of www.linuxpcfix.com and working as a Sr. Linux Administrator (Expertise on Linux/Unix & Cloud Server) and have been in the industry from last 7 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*

Time limit is exhausted. Please reload the CAPTCHA.

Categorized Tag Cloud