Page 1 of 1

How do I generate a CSR

Posted: Mon Dec 12, 2011 12:35 pm
by gamefest
My hosting account is a secured site and the SSL that I obtained from a certificate authority is about to expire. I am trying to generate a CSR from the secure server through puddy.exe. I've followed the instructions outlined in your SonicWiki page, https://wiki.sonic.net/wiki/Generate_a_CSR, but it doesn't seem to be working. The code that starts with "openssl.." asks for the host name. I've entered the host name completely with www. and .com, but I am not having any luck. Please help.

Re: How do I generate a CSR

Posted: Mon Dec 12, 2011 1:18 pm
by williamt
Which part are you having trouble with?
Below is the output of me generating a csr for foo.com

Code: Select all

# openssl req -out foo.com.csr -new -newkey rsa:2048 -nodes -keyout foo.com.key                            
Using configuration from /usr/share/ssl/openssl.cnf
Generating a 2048 bit RSA private key
..................................+++
.............................+++
writing new private key to 'foo.com.key'
-----
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]:Santa Rosa
Organization Name (eg, company) [My Company Ltd]:Sonic.net
Organizational Unit Name (eg, section) []:Security
Common Name (eg, your name or your server's hostname) []:foo.com
Email Address []:webmaster@foo.com

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

# ls -la foo.com.*
-rw-r--r--    1 root     root         1062 Dec 12 13:15 foo.com.csr
-rw-r--r--    1 root     root         1675 Dec 12 13:15 foo.com.key

Re: How do I generate a CSR

Posted: Mon Dec 12, 2011 1:34 pm
by gamefest
Okay. I tried it again and this time it worked by typing in the entire host name (with"www."). Now, how do I go about pulling the entire .csr and .key codes?

Re: How do I generate a CSR

Posted: Tue Dec 13, 2011 10:39 am
by williamt
You could either use scp to copy them to your computer or you could type
cat yourkeyORcsr and that will output them to the screen and you can copy
and paste them some where or you could mail them to your self like so:
mail youremail@sonic.net -s"My CSR" < server.csr
(repeat for your key)

Re: How do I generate a CSR

Posted: Tue Dec 13, 2011 11:14 am
by gamefest
Thank you. I will try that.

Re: How do I generate a CSR

Posted: Tue Dec 13, 2011 2:52 pm
by gamefest
Hi again. It worked and submitted the csr to the certificate authority. I expect to receive the public key within the next 24 hours. I know that I will need the public key, the private key generated with the CSR, and the CSR to complete the secure hosting configuration. Please send me detailed instructions on how I would go about do so. Thank you.

Re: How do I generate a CSR

Posted: Mon Dec 19, 2011 4:40 pm
by augie
Detailed instructions on how you would do what?