🔑sshd_config
Also known as /etc/ssh/sshd_config, SSH Server Config, PermitRootLogin
The settings file for the SSH server. It decides who may log in and how.
Think of it like
Think of it like the rule sheet on the doorman's desk. It says who may come in and how.
Example
Jack sets PermitRootLogin to no and reloads SSH. Now nobody can log in straight to root, even with the right key.
Why it matters
A few lines here decide how hard the server is to break into.
Definition
Example code
console
$ grep -E '^(PermitRootLogin|PasswordAuthentication)' /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
$ sudo systemctl reload sshCommon mistake
Key takeaways
- 1Server side. Lives in /etc/ssh.
- 2Reload to apply. Edits do nothing until then.
- 3Test first. Keep one session open.