🔑SSH Config File (~/.ssh/config)
Also known as ~/.ssh/config, SSH Client Config, SSH Host Alias
A file on your own computer. It gives each server a short name and its login.
Think of it like
Think of it like the contacts list in your phone. You tap a name, and the phone knows the number.
Example
Lucy logs in to three servers each day. She gives each a nickname, so she types ssh shop instead of a long line.
Why it matters
It saves typing and stops mistakes, like logging in as the wrong user or with the wrong key.
Definition
Example code
console
$ cat ~/.ssh/config
Host shop
HostName 203.0.113.10
User lucy
IdentityFile ~/.ssh/id_ed25519
$ ssh shopCommon mistake
Key takeaways
- 1Your side. Lives on the computer you log in from.
- 2Nicknames. One Host block per server.
- 3Not sshd_config. That one is on the server.