SSH
Cheat sheet · https://pcornel.dk/topic.php?topic=359
Answer
SSH gives encrypted remote shell access, file transfer and tunnelling. On Linux the server is OpenSSH's sshd and the client is ssh, authenticating with keys (preferred) or passwords.
Remember
Use key authentication, disable password and root login on internet-facing servers, and keep the server config valid (sshd -t) before restarting. ssh -v and the server journal together show where a login fails.
First checks
ssh -v user@host— client-side connection and authentication stepsjournalctl -u ssh -u sshd -e— server logsshd -T— effective server settingsss -ltnp | grep :22— sshd listening
Commands
ssh-keygen- Generate, inspect, convert and manage SSH public/private key material and known-host keys.
sshd -T- Read current SSH state for a bounded verification step.
Verify in this order
TCP 22 → protocol and key exchange → host key verified → user authenticated (key/password) → session
Where it usually breaks
First mismatch in link/interface → address/namespace → route/neighbor → firewall/policy → socket/daemon → DNS/TLS/SSH/application peer path; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=359