If you wanna check SSL certificate expiration date for specific domain via command line, you can use openssl
command.
Let’s check google.com:443
certificate expiration date using openssl
.
$ openssl s_client -connect google.com:443 -servername google.com < /dev/null 2> /dev/null | openssl x509 -text | grep "After"
Not After : Dec 6 17:09:00 2017 GMT
Dec 6 17:09:00 2017 GMT
is expiration date.