Ask Your Question

How can I check the expiry of a SSL certificate in the Command Line?

asked 2023-04-05 10:16:47 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-05 10:17:35 +0000

qstack gravatar image

You can use the openssl command to check the expiry of an SSL certificate in the Command Line. Here's how:

First, identify the location of the certificate file you want to check. This will depend on your server configuration and which SSL/TLS software you're using.

Use the following command to check the expiry date of the certificate:

openssl x509 -enddate -noout -in /path/to/certificate.pem

Replace /path/to/certificate.pem with the actual path to your certificate file.

This command will output the expiry date and time of the certificate in the following format:


The notAfter field shows the date and time after which the certificate is no longer valid.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools

1 follower


Asked: 2023-04-05 10:16:47 +0000

Seen: 2 times

Last updated: Apr 05