OpenSSL: Generate self-signed certificates

OpenSSL can generate self-signed SSL certificates easily. For internal services I usually generate a cert that is valid for ten years. Use the following commands to create a certificate and key file.

openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout $DOMAIN.key -out $DOMAIN.crt
Leave A Reply
All content licensed under the Creative Commons License