echo | openssl s_client -connect <your server here>:443 2>/dev/null | openssl x509 -noout -dates

Taken from letsencrypt community answer:

https://community.letsencrypt.org/t/it-there-a-command-to-show-how-many-days-certificate-you-have/11351/2

Leave a Reply

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