SSL private key

I am trying to find my private SSL key on the server is there a command to do this? So it will output the private key.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted


If it was generated by Let’s Encrypt, your key files will be within the /etc/letsencrypt directory. If you didn’t use Let’s Encrypt, they’d be in the location you placed them in when you setup your cert.

You should be able to look at your VirtualHost or Server Block configuration to find the exact path of the cert and the private key though.

Your configuration would be in either: