View TLS certs for HTTPS sites from the command line

echo | openssl s_client -showcerts -servername {domain} -connect {domain}:443 2>/dev/null | openssl x509 -inform pem -noout -text

echo | openssl s_client -showcerts -servername presearch.com -connect presearch.com:443 2>/dev/null | openssl x509 -inform pem -noout -text

keywords: curl, openssl, tls, https, ssl

This article was updated on 2023-01-25

I'm nabeards. I'm a full stack JavaScript developer. I travel full time, a.k.a., Professional Wanderer, a.k.a., Digital Nomad.