SSH Config File vs sshd_config
People often think these are one file, because the names are so close. ~/.ssh/config lives on your own computer and sets up how you log in. sshd_config lives on the server and sets the rules for who may log in. Editing the wrong one changes nothing you meant to change.
SSH Config File (~/.ssh/config)
A file on your own computer. It gives each server a short name and its login.
The SSH config file is a settings file on your own computer, at ~/.ssh/config. It gives each server a short nickname. Under the nickname you write the address, the user, the port and which key to use. Then ssh and the nickname is all you type. It is for the client, not the server.
sshd_config
The settings file for the SSH server. It decides who may log in and how.
sshd_config is the settings file for the SSH server. It lives at /etc/ssh/sshd_config. Each line turns one rule on or off, like whether root may log in. Changes only count after you reload the SSH service. A mistake here can lock everyone out, so test before you log out.
In one line
- SSH Config File (~/.ssh/config)
- A file on your own computer. It gives each server a short name and its login.
- sshd_config
- The settings file for the SSH server. It decides who may log in and how.