Generating a Self-Signed SSL Certificate

Command: The following command generates a self-signed key and certificate interactively.

Command Details:

To generate a self-signed SSL certificate with OpenSSL, use the following command:

openssl req -x509 -newkey rsa:4096 -keyout Selfsigned_key.pem -out Selfsigned_cert.pem -sha256 -days 3650 -nodes

Explanation of the command:

By running this command, you will generate a self-signed SSL certificate along with a private key that is not encrypted.