To generate a Certificate Signing Request (CSR) for an SSL certificate using OpenSSL, follow these steps:
- OpenSSL Installation Check: Ensure OpenSSL is installed by running
dpkg -l 'openssl*'. If it's not found, contact your hosting provider.- Replace
bare_ec.keyandbare_ec.csrwith your desired filenames. -subjspecifies the subject details, including organization and domain.-addext san:DNS.1=...adds Subject Alternative Names (SANs) for multi-domain coverage.
- Replace
- Activate SSL Certificate: Use the CSR content provided by your CA (Certificate Authority) to complete the certificate application.
Verify CSR Content: Open the generated CSR file to ensure it starts and ends with the correct tags:
cat bare_ec.csr
The output should begin with -----BEGIN CERTIFICATE REQUEST----- and end with -----END_CERTIFICATE_REQUEST-----.
Generate CSR with Subject and SANs:
openssl req -new -nodes -keyout bare_ec.key -out bare_ec.csr \
-subj /DC=US/ST=WA/L=Seattle/O=Esadax Inc./OU=Organization/CN=esadax.com \
-addext san:DNS.1=esadax.com,DNS.2=www.esadax.com
