Quickly check SSL certificate expiry from the command line

A quick little snippet to check when an SSL certificate on a remote server is expiring:

openssl s_client -connect mail.example.com:25 | openssl x509 -noout -enddate


Works for any kind of SSL service, not just SMTP.

This entry was posted in Sysadmin and tagged . Bookmark the permalink.
blog comments powered by Disqus