How to check if a SSL Certificate is expired

Have you ever wondered how you can check the validity of a certain SSL certificate from shell / SSH? There is an useful script that we typically use on our end. If the location provided below is no longer available, please feel free to contact us as we have a copy.


Replace “/PATH/TO/SAVE/FILE” wieth your own preferred path of choice e.g. “/usr/local/src/ssl-cert-check”. We will now use this path in our example.

cd /usr/local/src/
chmod +x ssl-cert-check
./ssl-cert-check -c /PATH/TO/SSL/YOURDOMAIN.CRT

The script will output whether the certificate is still valid. Enjoy.