With snap:
sudo snap install ssl-check --beta --devmode
Build from source:
This installation method works on Linux and MacOs. Having golang installed and added to the $PATH is required
git clone [email protected]:kubakl/ssl-checker.git
cd ssl-checker
sudo make install
This will display the expiration date of the certificate on www.foobar.com:
ssl-check -d www.foobar.com
Providing a file with domains instead of passing them one by one:
ssl-check -f myDomains.txt
Displaying number of days left before the certificate will expire:
ssl-check -d www.foobar.com -l
ssl-check -f myDomains.txt -l
Providing a config file for email notifications:
ssl-check -f myDomains.txt -l -e config.json
ssl-check -d www.foobar.com -l -e config.json
You have to pass domains line by line
www.foo.com
www.bar.com
www.foo.org
www.bar.org
// config.json
{
"sender_email": "[email protected]", // your email address
"sender_password": "foobar", // your password for the email
"smtp_host": "smtp.foobar.com", // smtp server from which you want to send the message
"smtp_port": "587", // port on which the server is exposed
"receivers": [ // list of addresses where you want to send the message
"[email protected]",
"[email protected]"
],
"alert_before": 14 // will send an email 14 days before the expiration
}
NOTE: If you are not using your local smtp server you have to make sure to allow the access for third party applications in your mail account.
If you have directories with your domains:
ls | xargs -n1 ssl-check -l -d
ls | xargs -I % ssl-check -d % -l
If you have several files with domain names inside:
ls | xargs -n1 ssl-check -l -f
ls | xargs -I % ssl-check -f % -l