A simple and lightweight Bash script to check the SSL certificate status of a domain name. It's a command-line alternative to popular SSL checker tools, like SSL Shopper, and provides a quick way to obtain key information about SSL certificates directly from your terminal.
The script has been tested on various Linux distributions, including CentOS, Ubuntu, Mint, and Debian.
The script retrieves and displays the following SSL certificate information:
- Domain name the SSL certificate is issued for
- Number of days until the SSL certificate expires
- Issue and expiry dates of the SSL certificate
- Certificate issuer details
- Supported TLS versions
- Certificate fingerprint (SHA1)
Ensure that openssl
is installed on your system before running the script.
To use the script, follow these steps:
-
Download the script using
wget
:wget https://raw.githubusercontent.com/bobbyiliev/bash-ssl-checker-tool/master/ssl
-
Make the script executable:
chmod +x ssl
-
Run the script with the desired domain name:
./ssl yourdomain.com
Here is a sample of the output you can expect:
The bobbyiliev.com domain name seems valid
# SSL Certificate Details:
Domain: CN = bobbyiliev.com
----
# SSL Certificate Expiry:
Expires in: 90 days
----
# Important Dates:
Issued On: Jun 4 09:05:19 2020 GMT
Expires On: Sep 2 09:05:19 2020 GMT
----
# Issuer Information:
Issuer: C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
----
# Supported TLS Versions:
| TLSv1.0
| TLSv1.1
| TLSv1.2
----
# Certificate Fingerprint:
SHA1 Fingerprint = C1:E1:6C:46:8A:74:94:14:00:94:88:B9:4B:2B:C5:90:79:DE:72:64
----
- The script requires
openssl
,host
andnmap
to be installed on your system. You can install them using your package manager:sudo apt-get install openssl nmap host # Ubuntu/Debian sudo yum install openssl nmap host # CentOS/RHEL
For more information, check out the full blog post here.