Check ssl certificate for start and expire dates

3 yaers ago, Thu, Feb 23, 2017, 09:20:07
echo | openssl s_client -connect host:port 2>/dev/null | openssl x509 -noout -startdate -enddate

# Example:
echo | openssl s_client -connect www.linuxos.pro:443 2>/dev/null | openssl x509 -noout -startdate -enddate
notBefore=Feb 13 18:15:00 2017 GMT
notAfter=May 14 18:15:00 2017 GMT

Comments