Pcornel
Linux · SSH

OpenSSH

Cheat sheet · https://pcornel.dk/topic.php?topic=2796

Back to the Topic

Answer

OpenSSH is the standard SSH implementation on Linux: sshd (server), ssh (client), scp/sftp (file transfer), ssh-keygen, ssh-agent and ssh-copy-id.

Remember

Server config /etc/ssh/sshd_config (plus sshd_config.d/), client config ~/.ssh/config and /etc/ssh/ssh_config. Check the version with ssh -V — older versions lack modern algorithms or reject old ones.

First checks

  • ssh -v user@host — client-side connection and authentication steps
  • journalctl -u ssh -u sshd -e — server log
  • sshd -T — effective server settings
  • ss -ltnp | grep :22 — sshd listening

Verify in this order

client ssh + config → server sshd + config → keys managed with ssh-keygen/agent

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=2796

Confirmation

Confirm action

Continue?