openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null

Category: Security & Hardening

openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null

Inspect a TLS server's certificate chain

Connects to example.com on 443 and dumps the handshake details: certificate chain, negotiated cipher, and validity dates. The -servername flag sets SNI so virtual hosts answer correctly. Pipe the output into openssl x509 -noout -dates to read just the cert dates.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.