Hosting Articles Technical Articles

How To Generate SSL Key And CSR In Centos



                                                                     How To Generate SSL Key And CSR In Centos


If you want to convert website from http to https SSL is required to install in the server.SSL will provide by different organization(Thawte,verisign).Here is the simple steps to create SSL.

How To Generate SSL Key And CSR In Centos01


– Login to the server using root credentials.

-Need to generate serverkey and csr,crt.

– In first step generate server key using the below command,

$ openssl genrsa -des3 -out 1024

Generating RSA private key, 1024 bit long modulus
e is 73547 (0x01001)
Enter pass phrase for
Verifying – Enter pass phrase for

# ls -ltr www.thegeekstuff.*
-rw-r–r– 1 root root   963 Jun 14 10:26

– Generated key is looking like below once,

Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,485B3C6371C9916E


How To Generate SSL Key And CSR In Centos

– Now generate CSR using the server key,

$openssl req -new -key -out

– It will ask the contact details and locations as mention in the below,

Enter pass phrase for
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
Country Name (2 letter code) [GB]:US
State or Province Name (full name) [Berkshire]:California
Locality Name (eg, city) [Newbury]:Los Angeles
Organization Name (eg, company) [My Company Ltd]:The Tech Stuff
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your name or your server’s hostname) []: techstuff
Email Address []:

Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

– After filling the details reboot the server.

Tags:SSL,SCR,Server key,Open ssl,Open ssl errors,Open ssl bug,SSL installation,SSL configuration

About the author


Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.