Creating a Self-Signed Certificate in Linux

 

  It typically OpenSSL comes pre-installed on Linux

 

  1.  Open Terminal
    Most Linux distributions come with OpenSSL pre-installed.

  2. Generate the Private Key
    openssl genrsa -out myprivatekey.key 2048


  3. Create the Certificate Signing Request (CSR)
    openssl req -new -key myprivatekey.key -out myrequest.csr
    Enter the information for your organization or domain as prompted.

  4. Generate the Self-Signed Certificate
    openssl x509 -req -days 365 -in myrequest.csr -signkey myprivatekey.key -out mycertificate.crt


  5. Verify
    Your certificate (mycertificate.crt) and private key (myprivatekey.key) are now created.

Post a Comment

Previous Post Next Post