Verbose mode is the answer to almost every SSH question
When SSH doesn't do what you expected, ssh -v prints the entire authentication conversation — what the client offered, what the server accepted, which key files were tried, which permission checks passed. The first 30 lines of -v output answer most "why isn't this working?" questions in under a minute.
Three levels: -v (basic), -vv (more), -vvv (everything, often too much).
What to look for in -v output
Good signs:
debug1: Connecting to 192.168.1.100 port 22.
debug1: Connection established.
debug1: Offering public key: /Users/you_username/.ssh/id_ed25519
debug1: Authentication succeeded (publickey).
Bad signs:
debug1: identity file ~/.ssh/id_ed25519 type -1 ← key not found / unreadable
debug1: No more authentication methods to try.
Permission denied (publickey,password).
The classic failure modes
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused | sshd not running, firewall blocking | Check daemon, check firewall, check port |
| Permission denied (publickey) | Key not in authorized_keys, or perms wrong | chmod 700 ~/.ssh; chmod 600 authorized_keys |
| Permission denied (publickey,password) | Wrong key tried first, or wrong username | Check -v output for which keys are tried |
| Host key verification failed | Server reinstalled, key changed | ssh-keygen -R host if expected |
| Hangs forever | Firewall silently dropping packets | ssh -o ConnectTimeout=5 |