Easily check SSL certificates on websites

Here is a simple script to quickly get an overview of the SSL certificates used on various websites, e.g. to check expiration or issuer. For me, this helped a lot while migrating website certificates to Let’s Encrypt.

The script is loosely based on “Zext ssl cert.sh” ( see https://www.zabbix.org/wiki/Docs/howto/ssl_certificate_check) but slightly rewritten for the purpose of bulk checking and listing more deails of certificates. The openssl command is required for the script to work properly.

After you have downloaded the script, simply edit the domains at the top of the file to match your websites. DOMAINS is an array which is to be filled with strings in the format:

domain port [protocol]

Domain and port should be self-explanatory, for simple website SSL checks use port 443 (aka https). You can also check SMTP or IMAP servers, then use smtp resp. imap as protocol and 25 resp. 143 for port. If you specify the protocol option, openssl will use STARTTLS for the connection attempt.

ssl_website_check.sh in action

ssl_website_check.sh in action

Get the script on https://github.com/eht16/ssl_website_check.sh.