4

I use Ubuntu 16.04 with Nginx for my web server. I setup my website SSL with Let's Encrypt. And I want to get private, public key pair of Let's Encrypt.

Can someone point out where those files exist?

  • @techraf I already setup the ssl certificate. But, what I want to know is where is my public, private key pair. – Set Kyar Wa Lar Aug 02 '16 at 08:02
  • I use ubuntu 16.04 with nginx setup. And I use ssl for let's encrypt. I want to get public vs private key pair from my ssl. How do I get it? @techraf – Set Kyar Wa Lar Aug 02 '16 at 08:07
  • How you did it also affects where things may be located. I use the certonly option (don't want 3rd party messing w/ my webserver config, although I use apache not nginx) and so my stuff ends up under /etc/letsencrypt/example.com/live which are just symlinks to the actual certificates (archive versions, LE keeps several old versions for you automatically) – ivanivan Dec 12 '17 at 03:34

1 Answers1

8

For Nginx you need to check the /etc/nginx/sites-enabled directory for the configuration file of your website (there might be multiple files).

Then you need to check their contents for configuration lines:

  • ssl_certificate which will point to the certificate chain (fullchain.pem)
  • ssl_certificate_key which will point to the private key (privkey.pem).

Finally you should use openssl command to extract the public key from the certificate chain file:

openssl rsa -in <path_to_privkey.pem> -pubout > key.pub
techraf
  • 4,343