From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Generating keypairs and self-signed certificates

Generating keypairs and self-signed certificates - Red Hat Enterprise Linux Tutorial

From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

Start my 1-month free trial

Generating keypairs and self-signed certificates

- [Instructor] Before we can create a secure website, we need to create a self signed certificate. In the RHCE exam you will be given a key and certificate, but knowing the process of creating your own can help with understanding SSL and HTTPS. For this exercise, you need to be logged into rhhost1 and have a terminal open. You also need to have installed mod_ssl and openssl. Start by changing into the certificate structure by typing in cd /etc/pki/tls/certs, and hit Enter. You should be able to do this as a normal user. Now let's generate the RSA private key. Type in sudo openssl genpkey - algorithm rsa -pkeyopt rsa_keygen_bits:2048 -out secure.localnet.com.key, and hit Enter. Type in your password if prompted. This should create a key called secure.localnet.com.key in the current directory. Type in ls to verify. Now that we have our private key, we need to create a certificate signing request or CSR. Type in clear, and then type in sudo openssl req -new - key secure.localnet.com.key…

Contents