How to generate a CSR code?

Creating SSL Private Key

Before you generate a CSR you need to create a private key first. All modern SSLs require 2048 bit key. 

$ openssl genrsa -out private.pem 2048

Command above creates a private key without password protection and writes it to private.pem file. To create a password protected key use next command.

$ openssl genrsa -des3 -out private.pem 2048

Generating a CSR

Now we are ready to create a CSR. It is as simple as typing command below into console:

$ openssl req -out -key private.pem -new

To view CSR you just need to open file with text editor (use vim or nano) or use "cat" command to print to your console.

$ cat

External Links

* For more info about using openssl command visit
* OpenSSL man pages
  • 48 Users Found This Useful
Was this answer helpful?

Related Articles

Can I secure multiple subdomains with a single certificate?

Yes, you can protect multiple sub-domains with a single SSL certificate. Wildcard SSL...

Info required to generate a Certificate Signing Request (CSR)

Our team can help you to generate CSR (Certificate Signing Request) required to configure your...