Before and after
Without an SSH config alias, you type the full incantation every time:
ssh you_username@192.168.1.10 -p 2222 -i ~/.ssh/id_ed25519_office
With an alias, you type:
ssh office
Same effect. Every connection detail lives in ~/.ssh/config once. This isn't just convenience — it eliminates typos, ensures consistent settings, and makes scripts portable. scp file.txt office:/dest/, rsync -avz ./code/ office:/code/, ssh-copy-id office all just work because every SSH-based tool reads ~/.ssh/config.
The four lines you'll write 99% of the time
Most host blocks need just these four directives:
Host alias— the name you'll typeHostName ip-or-fqdn— the actual addressUser username— the remote usernameIdentityFile ~/.ssh/...— which key to use (often inherited fromHost *)