Back to commands

Linux Survival Basics

Read-only, sensitive output

Test SSH with One Identity File

You need to test one explicit identity without changing server config.

Command

ssh -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 user@example.com

Before you run this

System impact: Read-only. Output may expose users, paths, tokens, keys, IPs, process arguments, or log details.

When not to use it: Do not run against unknown hosts without verifying the host key first.

Expected output

SSH either authenticates with the selected key or returns a narrower auth error.

System impact

Read-only, sensitive output. Nothing changes. The command reads current state and prints diagnostic evidence.

Recovery / rollback: no state is changed.

When to use it

Use after confirming the correct key path and target account.

When not to use it

Do not run against unknown hosts without verifying the host key first.

Common misread

Do not run against unknown hosts without verifying the host key first.

Example run

Commands shown

These are the commands shown for inspection. Treat them as an example, not proof that your system will behave identically.

  1. ssh -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 user@example.com
  2. ssh -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 user@example.com

next steps

Related commands

Linux Survival Basics Sensitive output

Run SSH Verbose Auth Test

Verbose SSH shows which key was offered.

ssh -vvv -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 user@example.com
Linux Survival Basics Sensitive output

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
Linux Survival Basics Read-only

Check Domain A Records

A renewal can fail because DNS points elsewhere.

dig +short example.com A
Linux Survival Basics Sensitive output

Find SSH Too Many Authentication Failures Lines

The auth log proves whether the server refused after too many offered keys.

grep -i 'Too many authentication failures' /var/log/auth.log /var/log/secure 2>/dev/null | tail -20

next diagnostic step

Where to go from this command

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.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.