How to Install and Use SSLyze in Linux to Audit SSL and TLS Cipher Suites and Server Certificates

Securing public-facing web servers and corporate API endpoints requires verifying that modern encryption standards are strictly enforced. Weak legacy ciphers (such as RC4 or 3DES), insecure protocols (SSLv3, TLS 1.0, TLS 1.1), missing HTTP Strict Transport Security (HSTS) headers, or improperly ordered certificate chains expose organizations to data interception and compliance failures. The Python-based command-line security tool SSLyze is a fast and comprehensive SSL/TLS configuration auditing utility designed for system administrators, security engineers, and automated DevOps security checks.

Why Use SSLyze for TLS Auditing?

Unlike basic browser certificate inspection or generic port probes, SSLyze communicates directly with target servers using a custom OpenSSL wrapper. It tests every supported cipher suite, measures cryptographic key exchange sizes, validates certificate trust chains against Mozilla, Apple, and Microsoft trust stores, checks for deprecated cipher vulnerabilities (Heartbleed, ROBOT, OpenSSL CCS Injection), and generates clean JSON and text reports.

Installation Instructions

Prerequisites (Python and Pip)

SSLyze is distributed as a pre-compiled Python package with bundled cryptographic binaries.

On Ubuntu and Debian

sudo apt update
sudo apt install python3 python3-pip python3-venv -y
python3 -m venv ~/sslyze-env
source ~/sslyze-env/bin/activate
pip install --upgrade sslyze

On Fedora, RHEL, and Rocky Linux

sudo dnf install python3 python3-pip -y
python3 -m venv ~/sslyze-env
source ~/sslyze-env/bin/activate
pip install --upgrade sslyze

On Arch Linux

sudo pacman -S python-pip
pip install --user sslyze

Step-by-Step Practical Usage

Step 1: Running a Comprehensive Default TLS Audit

To run a complete diagnostic scan against a web server:

sslyze example.com

SSLyze probes the target host across port 443, testing TLS 1.0 through TLS 1.3, checking certificate validity, and assessing cipher security.

Step 2: Checking Supported Cipher Suites by Protocol Version

To audit whether deprecated protocols (such as TLS 1.0 or TLS 1.1) are disabled while verifying TLS 1.3 support:

sslyze --tlsv1 --tlsv1_1 --tlsv1_2 --tlsv1_3 example.com

A secure server should report Rejected for TLS 1.0 and 1.1, and list only strong forward-secret AEAD ciphers for TLS 1.2 and 1.3.

Step 3: Auditing Certificate Chains and Trust Stores

To verify that intermediate certificates are properly sent by the server and trusted by major root stores:

sslyze --certinfo example.com

The output highlights expiration dates, Key Usage, Subject Alternative Names (SAN), and whether the leaf certificate is signed with a secure hashing algorithm (SHA-256 or SHA-384).

Step 4: Testing for Known Cryptographic Vulnerabilities

To evaluate vulnerability to Heartbleed and ROBOT (Return of Bleichenbacher’s Oracle Threat):

sslyze --heartbleed --robot example.com

Step 5: Exporting Structured JSON for CI/CD Pipeline Automation

To pipe findings into automated DevSecOps compliance pipelines:

sslyze --json_out=tls_audit.json example.com

Key SSLyze Audit Scans Reference

Scan Command Flag Evaluated Property Compliant Result Security Risk When Failing
--tlsv1 / --tlsv1_1 Legacy Protocol Support Rejected / Not Supported Vulnerable to downgrade and POODLE attacks
--tlsv1_3 Modern TLS 1.3 Support Supported (0-RTT optional) Missing performance and security enhancements
--certinfo X.509 Certificate Chain Valid Chain / Trusted CA Browser “Untrusted Connection” warnings
--hsts HTTP Strict Transport Security Enabled with high max-age Vulnerable to SSL stripping and MITM attacks
--reneg Session Renegotiation Secure / Client-initiated disabled Vulnerable to DoS and injection attacks

Operational Notes and Best Practices

  • Specifying Custom Ports: If testing mail servers (STARTTLS) or non-standard web ports, append the port number: sslyze mail.example.com:587 --starttls=smtp.
  • Server Name Indication (SNI): By default, SSLyze sets SNI matching the target hostname. If connecting to an IP address directly, specify SNI manually using --sni=example.com.
  • Regular Auditing: Cipher suite recommendations evolve continuously. Schedule recurring SSLyze scans via cron to catch certificates nearing expiration (within 30 days) before outages occur.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.