Generate CSR using OpenSSL

Info needed for Certificate Signing Request (CSR) generation

Country Name (2 letter code): 
State or Province Name:
Locality Name (eg, city):
Organization Name (eg, company):
Email Address:

Generate CSR

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

Here is oneliner

openssl req -new -newkey rsa:2048 -nodes -out DOMAIN.csr -keyout DOMAIN.key -subj "/C=COUNTRY-CODE/ST=STATE/L=CITY/O=BUSINESS/OU=Retail/CN=DOMAIN/[email protected]"

To generate SSL for multi domain (SAN), just enter domains separated by space. If normal SSL, just enter domain with out www.

For wildy card use *.domain.com

Example

$ openssl req -new -newkey rsa:2048 -nodes -out webhostingneeds.com.csr -keyout webhostingneeds.com.key -subj "/C=IN/ST=Kerala/L=Kochi/O=WebHostingNeeds.com/OU=Retail/CN=webhostingneeds.com"
Generating a 2048 bit RSA private key
.+++
.....................+++
writing new private key to 'webhostingneeds.com.key'
-----
$ 

OpenSSL CSR Wizard

https://www.digicert.com/easy-csr/openssl.htm

View CSR Details

openssl req -in DOMAIN.csr -noout -text
Need help with Linux Server or WordPress? We can help!

Leave a Reply

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