How to generate a CSR from a private SSL key?

I am renewing my SSL key for my websites. The CA requests a CSR. I have my private key. How to generate a CSR (Certificate Signing Request) from a private SSL key?

You can generate a CSR from your private key with openssl:

openssl req -new -key ssl.key -out req.pem

Here, ssl.key is your private key and req.pem will store your CSR. (Ref: OpenSSL examples

You can easily decode your CSR to see what is in it by using

openssl req -in req.pem -noout -text

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

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