Logon to your Ubuntu server using SSH.

Step 1 – Setup a new Directory

Create a folder to store the files called in home directory called ssl. Go into the newly created directory.

$ mkdir ssl
$ cd ssl

Step 2 – Create Private Key

Generate a private key by executing the following command.

$ sudo openssl genrsa -des3 -out example.key 2048

Type in pass phrase.

Step 3 – Create CSR

Generate CSR by executing the following command.

$ sudo openssl req -new -key example.key -out example.csr

Enter the private key pass phrase.

Enter the following details:

Step 4 – Check and Open the CSR file created

Run the following commands

$ ls
$ cat example.csr