Table of Contents

Generate CSR from command line linux

Generate CSR

You will need to have openssl installed.
Replace domain.com with your domain.

openssl req -new -newkey rsa:2048 -nodes -keyout domain.com.key -out domain.com.csr

Attributes explanation:

After running the command, you'll be prompted to enter details that will be embedded in your CSR.
This includes:

Verify CSR

After you've filled in all the necessary information, OpenSSL will generate your CSR and save it to the file domain.com.csr, and your private key to domain.com.key. You should keep your .key file secure and private, while the .csr file is what you will submit to a Certificate Authority (CA) when requesting your SSL certificate.

Remember to review your CSR details before submitting it to a CA.
You can use the following command to review the CSR:

openssl req -text -noout -verify -in domain.com.csr

This command displays the CSR's details, including the public key, and verifies its correctness.