#!/bin/bash # filename checkSSLCertificate.sh # 使用方法 checkSSLCertificate.sh domain server_ip echo | openssl s_client -showcerts -servername $1 -connect $2:443 2>/dev/null | openssl x509 -inform pem -noout -text