Linux Survival Basics
Read-onlyShow HTTPS Certificate with curl
You need client-visible TLS certificate details during an HTTPS request.
Command
curl -Iv https://example.com/ 2>&1 | sed -n "/SSL connection/,/expire date/p"
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not treat this as a substitute for checking the server block and certificate files.
Expected output
TLS handshake, subject, issuer, and expiry lines from curl verbose output.
System impact
Read-only. Nothing changes. The command reads current state and prints diagnostic evidence.
Recovery / rollback: no state is changed.
When to use it
Use when browser and server assumptions disagree.
When not to use it
Do not treat this as a substitute for checking the server block and certificate files.
Common misread
Do not treat this as a substitute for checking the server block and certificate files.
Example run
Commands shown
These are the commands shown for inspection. Treat them as an example, not proof that your system will behave identically.
curl -Iv https://example.com/ 2>&1 | sed -n "/SSL connection/,/expire date/p"curl -Iv https://example.com/ 2>&1 | sed -n "/SSL connection/,/expire date/p"
next steps
Related commands
Read TLS Certificate Subject and Issuer
The certificate can be valid but issued for the wrong name.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates
Show Served Certificate SANs
SANs decide which hostnames the certificate covers.
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -ext subjectAltName
Show the Real User Cron Jobs
Cron problems often hide behind comments, blank lines, and copied folklore.
crontab -l | sed -n '/^[[:space:]]*#/d;/^[[:space:]]*$/d;p'
Check Domain A Records
A renewal can fail because DNS points elsewhere.
dig +short example.com A
Run SSH Verbose Auth Test
Verbose SSH shows which key was offered.
ssh -vvv -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 user@example.com
next diagnostic step
Where to go from this command
- Related problem hub Use this command as part of the repair path.
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.