sshd_config
The main configuration file for the SSH daemon on Linux, usually located at /etc/ssh/sshd_config. Settings here control whether password login, root login and specific encryption ciphers are allowed.
What this file actually controls
sshd_config governs nearly every security-relevant SSH behavior on a server: whether root can log in, whether passwords are accepted, which port the daemon listens on, and which users or groups are allowed to connect at all.
A common mistake
Editing this file directly and restarting the SSH service without testing the new configuration in a second session first. A single typo can lock every remote session out of the server with no way back in except console access from the hosting provider.
Frequently asked questions
Where is sshd_config located?
Almost always at /etc/ssh/sshd_config on Debian, Ubuntu, RHEL and most other Linux distributions.
How do I apply changes after editing it?
Run sshd -t first to check the syntax, then restart or reload the SSH service, for example with systemctl reload sshd, while keeping an existing session open in case something breaks.
What is the single highest-impact setting in this file?
PasswordAuthentication. Setting it to "no" in favor of key-based login removes the most common brute-force target on the entire server.
Want to see where your own server stands?
Run the free, read-only server check, or open the Security Lab and watch the detect, contain, recover, verify loop in action.
Get your free server checkOpen the Security Lab