certcheck - SSL Certificate Checker

Check SSL/TLS certificate expiration dates for one or more hosts.

Quick Start

certcheck example.com
certcheck host1.com host2.com
certcheck --days 30 example.com

Usage

certcheck <host>[:port]           # Check single host
certcheck <host1> <host2> ...     # Check multiple hosts
certcheck -f hosts.txt            # Read hosts from file
certcheck --days 30 <host>        # Warn if expiring within N days

Options

Option Description

--days N

Warning threshold in days (default: 30)

-f FILE

Read hosts from file (one per line)

Examples

Check Single Host

certcheck google.com
Output
🟢 google.com:443
   CN: *.google.com
   Expires: 2024-04-15 08:00 UTC (65 days)

Check Multiple Hosts

certcheck google.com github.com cloudflare.com

Check Custom Port

certcheck mail.example.com:993

Check from File

certcheck -f /etc/hosts-to-monitor.txt

Status Indicators

Icon Meaning

🟢

Certificate valid, >30 days remaining

🟡

Certificate expiring within warning threshold

🔴

Certificate expired or connection failed

Dependencies

  • cryptography - Certificate parsing

Use Cases

  • Monitor infrastructure certificates

  • Pre-renewal verification

  • Audit third-party service certificates