Open SSL Creating Certificate Signing Request — CSR Generation

A Certificate Authority will use a CSR to create your SSL certificate.

What is a CSR? A CSR or ‘Certificate Signing Request’ is a block of encrypted text, that is generated on the server that the certificate will be used on.

It contains information that will be included in your certificate, such as your organization name, common name (domain name), locality, and country. It also contains the public key that will be included in your certificate.

Run these OpenSSL commands, to generate your Certificate Signing Request.

Step 1: Generate a Private Key

$ openssl genrsa -out shellhacks.com.key 2048

If you need just to renew existence certificate and you already have the private key, you can skip this step and use it, instead of generating new one.

The number 2048 is the size of the key, in bits. Today, 2048 or higher is recommended for RSA keys, as fewer amount of bits is consider insecure or to be insecure pretty soon.

Step 2: Generate the CSR

$ openssl req -new -key shellhacks.com.key -out shellhacks.com.csr

The fields, required in a Certificate Signing Request, are listed below with explanations and examples :

Distinguished Name FieldExplanationExample
Common Name The fully qualified domain name (FQDN) for your web server. This must be an exact match. If you intend to secure the URL https://www.shellhacks.com/, then your CSR’s common name must be: www.shellhacks.com
Organisation The exact legal name of your organisation. Do not abbreviate your organisation name. ShellHacks Ltd.
Organisation Unit Section of the organisation, can be left empty if this does not apply to your case. Development department
City/Locality The city where your organisation is legally located. Balham
State/County/Region The state/county/region where your organisation is legally located. Must not be abbreviated. London
Country The two-letter ISO abbreviation for your country. GB
Email address The email address used to contact your organisation. info@shellhacks.com
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Linux Linux Network Statistics Tools / Commands
Viewed 9659 times since Mon, Sep 21, 2020
Linux Proxy Server Settings – Set Proxy For Command Line
Viewed 4391 times since Mon, Feb 18, 2019
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from
Viewed 5586 times since Wed, Oct 31, 2018
KONTO SFTP Z CHROOTEM Z UŻYCIEM OPENSSH-SERVER NA CENTOS/RHEL6
Viewed 2255 times since Fri, Nov 30, 2018
Open SSL Encrypt & Decrypt Files With Password Using OpenSSL
Viewed 9182 times since Mon, Feb 18, 2019
Fake A Hollywood Hacker Screen in Linux Terminal linux FUN
Viewed 7010 times since Thu, Apr 18, 2019
Extending Linux LVM partitions script
Viewed 6845 times since Wed, Feb 6, 2019
ubuntu How to Reset Forgotten Passwords in Ubuntu 16.04
Viewed 4093 times since Tue, Dec 8, 2020
Do you Know These 5 Use of V$session View ?
Viewed 155174 times since Thu, Jun 21, 2018
Open SSL HowTo: Decode SSL Certificate
Viewed 6533 times since Mon, Feb 18, 2019