Home / Linux / Générer un certificat SSL en une ligne de commande

Générer un certificat SSL en une ligne de commande

SSL

Générer un certificat SSL auto-signé est une action simple, mais pénible quand on a à le faire souvent.

Voici une commande qui vous permettra d’en généré un en une seul ligne :

# openssl req -new -newkey rsa:2048 -nodes -x509 -subj '/C=FR/ST=IDF/L=PARIS/O=YourOrg/CN=www.yourorg.com' -days 3650 -keyout example.key -out example.crt

Nous demandons à openssl un nouveau certificat avec “req”, nous utilisons une clé 2048 bits, nodes permet d’enlever la création d’un certificat protégé par un mot de passe, enlevez ce paramètre est plus sure ;), ensuite, avec “subj”, nous répondons à toutes les questions posées pour la génération du certificat. Puis “out” : nos fichiers de sortie.

A la prochaine ;)

About Alexandre Nogard

Check Also

Forcepoint : Deploy the SMC on AWS | Part III

Learn how to deploy the Forcepoint SMC & Log Server on AWS behind a NGFW Firewall with a VPC, in a public & private subnet and an Elastic IP

Forcepoint : Deploy the SMC on AWS | Part II

In the first Howto Forcepoint : Deploy the SMC on AWS | Part I, we …

Forcepoint : Deploy the SMC on AWS | Part I

How to deploy Forcepoint SMC (Security Management Center) on AWS ? This is a good …

One comment

  1. hop, en favoris :)

Leave a Reply

Your email address will not be published. Required fields are marked *