How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

September 18, 2012

Generating a Certificate Signing Request (CSR) 2048 bits

Filed under: Linux — Tags: , , , , — admin @ 3:20 pm

How to create your 2048 bit CSR via SSH
Well first of all this is require by new hosting company .

To generate this you have to run

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
You must replace yourdomain with domain that you want to use. Example if is for matrafox.info
openssl req -new -newkey rsa:2048 -nodes -keyout matrafox.key -out matrafox.csr

You will be asked next question:

2. You will be prompted to enter some information for your CSR:

Country Name (2 letter code) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []:
Email Address []:

Please enter the following ‘extra’ attributes to be sent with your certificate request

A challenge password []:
An optional company name []:

The ‘CN’ field (Common Name) is where you should enter the fully qualified domain name of the website you require the certificate for.
Note: for wildcard certificates, the Common Name should be in the format: *.mydomain.com

Try to not insert a password even if is less secure. However this will not require the password every time when you restart apache server .

How to convert csr to crt

Just run :
openssl x509 -req -in matrafox.csr -signkey matrafox.key -out matrafox.crt

Just replace matrafox.* with your file name

Powered by WordPress