This article describes how to generate a private key and CSR (Certificate Signing Request) from the command line. You may need to do this if you want to obtain an SSL certificate for a system that does not include cPanel access, such as a dedicated server or unmanaged VPS.
To generate a private key and CSR from the command line, follow these steps:
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr
At the Country Name prompt, type the two-letter country code for your location, and then press Enter.
At the Common Name prompt, type the domain name that you want to secure with the SSL certificate, and then press Enter.
OpenSSL generates the private key and CSR files. If you typed the command in step 2 exactly as shown, the files are named server.key and server.csr. You can now send the text in the server.csr file to the signing authority to obtain your certificate. (Do not send the information in your private key!)
You can view and verify the information contained in the CSR. To do this, type the following command:
openssl req -noout -text -in server.csr
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.
We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.