To generate CSR request and private key via Ubuntu Linux console follow the instructions.
For one domain.
Enter the console and see:
openssl req -nodes -newkey rsa:2048 -keyout domain.com.key -out domain.com.csr -subj "/C=UA/ST=Lvovskaya oblast/L=Yavorov/O=domain.com/CN=domain.com/emailAddress=admin@domain.com"
Fill it with the necessary data: domain.com.- domain name. UA – country abbrevition (use only lowercase letters). Lvovskaya oblast – state/province, Yavorov – locality/city. admin@domain.com – e-mail for verification, not necessarily.
We get 2 files: domain.com.key and domain.com.csr.
Multi-domain:
1. Generate a private key for domain.com:
openssl genrsa -out domain.com.key 2048
2. Create a OpenSSL config file with the name openssl.cnf:
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
[req_distinguished_name]
countryName = Country Name (2 letter code)
countryName_default = UA
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = LV
localityName = Locality Name (eg, city)
localityName_default = Lviv
organizationalUnitName = Organizational Unit Name (eg, section)
organizationalUnitName_default = Domain Control Validated
commonName = Company Ltd
commonName_default = domain.com
commonName_max = 64
[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names
[alt_names]
DNS.1 = domain.com
DNS.2 = *.domain.com
DNS.3 = domain.com.ua
DNS.4 = domain.ru
3. Generate CSR request for a certificate:
openssl req -new -out domain.com.csr -key domain.com.key -config openssl.cnf
We get 2 files: domain.com.key and domain.com.csr.
CSR request and private key were successfully created via Ubuntu Linux console.