Linux security

How to Check Remote SSL Certificate from terminal inLinux

Here are 3 options you can use if you want to check on SSL certificate on any website from command line in terminal on your Linux box.

1. Using OpenSSL

echo | openssl s_client -showcerts -servername example.com -connect example.com:443 2>/dev/null | openssl x509 -inform pem -noout -text

2. Using OpenSSL

curl --insecure -vvI https://www.example.com 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'

3. Using nmap

nmap -p 443 --script ssl-cert example.com

Each of the above commands, when run, will display all the information present in the specified website’s SSL certificates such as issuer, algorithm, date of expiry, etc. that you can use to analyze the SSL certificate.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.