In this tutorial, we will show you how to generate a CSR on Google Cloud Platform.
Just follow the steps below:
Step 1: Enable the Google Cloud Platform Console
You can create your CSR request straight from your Google Cloud Platform Account via the Google Cloud Shell. However, this built-in command line console is only available if you’ve created a Project in your account. To create a project and enable the Cloud Shell, please follow Google’s official guide.
Step 2: Open the Console
Open the console by clicking the right side Activate Google Cloud Shell button from the top menu bar. The console window will pop up at the bottom of your page with the current user’s home directory (/home/user).
You can generate the CSR request in the default directory or any other location of your choice.
Step 3: Create the CSR
Run the command below to create your CSR:
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
Note: You should replace the yourdomain value with your real domain name.
Step 3: Submit your contact information
Please enter the data as shown in examples below:
- Country Name: type the two-letter abbreviation code of the country where your business is legally registered (e.g., US). You can find all the country codes
- State or Province: provide the name of the state or region where your company is located (e.g., Washington)
- City or Locality: enter the City where your company is registered (e.g., Seattle)
- Organization Name: submit the full name of your organization. If you have a Domain Validation SSL certificate, you can put NA instead
- Organizational Unit Name: type NA for Domain Validation certs; otherwise, indicate the department in charge of web security (e.g., IT)
- Common Name: provide the fully qualified domain name (FQDN) you want to secure. For example, yourdomain.com. If you have a Wildcard SSL Certificate, add an asterisk in front of your domain name (e.g., *.yourdomain.com)
- Email address: provide a valid email address
- A challenge password and An optional company name: skip these fields. Press enter to leave them blank
Double check the info you’ve just submitted and press Enter.
The command will generate your CSR code (csr file), along with your private key (yourdomain.key file).
You can now copy-paste the content of your CSR file including the —–BEGIN CERTIFICATE REQUEST—- and —–END CERTIFICATE REQUEST—-tags during your SSL Certificate order
As for the private key file, you will need it during the SSL installation. Please, save it in a safe directory.