Cheatsheet Pages / SSH Cheatsheet

How to set SSH defaults for every host — the Host * block

Keepalive and other defaults should apply everywhere, not per server.

Every flag and config keyword was checked against the OpenSSH 9.6 man pages, and the config examples were parsed for real with ssh -G.

Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3

Good to know

ssh_config uses the FIRST value it finds for each keyword — the opposite of most config files. So specific Host blocks go on top, and Host * defaults belong at the bottom of the file.

SSH Cheatsheet one-page card — commands that actually work
The full one-page card — SSH Cheatsheet. Get the complete cheatsheet on GitHub