SSL Setup – Certbot
SSL (Secure Sockets Layer) is a protocol used to establish secure and encrypted communication over the Internet. Most websites use the HTTPS (HyperText Transfer Protocol Secure) protocol to increase their security level. SSL is necessary for the HTTPS protocol, which uses a combination of the standard HTTP protocol and the SSL protocol.
To establish SSL communication, the web server has to be certified by a certificate authority (CA). Let's encrypt is one of the CAs and provides SSL certificates for free. To obtain a Let's encrypt SSL certificate, Certbot is often used. It is free, open-source software that automates the process of obtaining and installing SSL certificates from Let's Encrypt.
SSL authentication mechanism
As explained, a prerequisite for establishing SSL communication is having a web server with an SSL certificate (SSL server). Here are the key processes of the SSL authentication mechanism:
- A client sends a request to the SSL server
- When the SSL server receives the request, the SSL server sends its SSL certificate with its public key to the client
- Once the client receives the SSL certificate and verifies it, the client creates a symmetric key and encrypts the symmetric key using the public key from the server
- Then, the client sends the encrypted symmetric key to the SSL server
- When the SSL server receives the encrypted symmetric key, the SSL server decrypts it with its own private key. By now, the client and the SSL server have the same symmetric key sent through a secured channel.
- Both use the symmetric key as a session key to create a secured communication channel
As you can see in the processes above, SSL uses both Asymmetric Encryption and Symmetric Encryption. SSL uses Asymmetric Encryption for the first authentication, which is more secure. For a session key, SSL uses Symmetric Encryption, which is faster.
How to set up SSL using Certbot
Certbot allows you to get an SSL certificate on your web server easily and quickly.
Here are the key steps:
- Install Certbot for Nginx on Ubuntu OS
- Open an SSL port
- Obtain an SSL certificate by running the certbot command
- Check the result and test the configuration
Install Certbot for Nginx on Ubuntu OS
Run the command below if you are using Nginx.
sudo apt-get install certbot python3-certbot-nginx
If you are using a different server, check the Certbot instruction page.
Open SSL port<
Subscribe now for
uninterrupted access.