Skip to content

Generate Certificates using openssl One Liner

This is useful for scripting the generation of certificates for web servers.

openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
    -subj "/C=${node.ssl.country}/ST=${node.ssl.state}/L=${node.ssl.city}/O=${node.ssl.ou}/CN=${node.ssl.cn}" \
    -keyout /etc/ssl/private/node-selfsigned.key  -out /etc/ssl/certs/node-selfsigned.crt

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: