Are you worried about ssl certificate expiry ? I found a good solution for that 🙂 . This script will monitor the ssl certificate expiry and will provide e-mail notifications when a certificate is getting close to expire !!!
1) Download and setup the script for execution
wget http://prefetch.net/code/ssl-cert-check chmod 744 ssl-cert-check
2) To find the ssl expiry details of a local certificate
./ssl-cert-check -c /usr/local/sss/adminlogs.crt
3) To find the ssl expiry details of a remote domain
./ssl-cert-check -s www.adminlogs.info -p 443
4) To find the ssl expiry details of a list of domains
If you are managing a number of domains , you can place the domains in a file with port number as follows
# vi /home/domainlist
www.adminlogs.info 443
www.google.com 443
www.yahoo.com 443
Then save the file and execute the script with the option ” -f ”
./ssl-cert-check -f /home/domainlist ./ssl-cert-check -i -f domainlist
here ” i ” will give the details of ssl provider/issuer
5) Setup e-mail alerts if ssl expiry date is less than or equal to 20 days
ssl-cert-check can provide e-mail notifications when a certificate is getting close to expiring. The expiration interval can be controlled with ssl-cert-check’s “-x” (expiration interval) option, and the e-mail address to send notifications can be passed as an argument to the “-e” (e-mail address to send alerts) option.
./ssl-cert-check -a -f /home/domainlist -q -x 20 -e [email protected]
You can add the above command in cron and monitor your ssl certificate validity .
You can find more ssl related stuffs here : most-common-openssl-commands
Thank you prefetch.net for this excellent script !!!
Recent Comments