A broken SSH server configuration can block new logins the next time sshd reloads. Testing the configuration before applying a change catches misspelled directives, invalid include files, and unreadable host-key settings while the current daemon keeps running.
The OpenSSH daemon reads /etc/ssh/sshd_config and any files matched by an Include directive, commonly /etc/ssh/sshd_config.d/*.conf on current Linux packages. The sshd -t test parses that configuration tree and checks configured host keys, while sshd -t -f /path/to/file validates a staged file before it replaces the live configuration.
A clean test returns no output, so the next proof comes from a controlled reload, an active service check, and a fresh login from another session. Keep an existing shell or console path open until the new login succeeds, especially after changing AllowUsers, DenyUsers, AuthenticationMethods, Match, or listening directives.
Related: How to view SSH server configuration
Related: How to enable verbose SSH server logging
Keep a second SSH session or console path available until the tested configuration reloads and a new login works.
$ sudoedit /etc/ssh/sshd_config
Use the included drop-in file instead when the local policy lives under /etc/ssh/sshd_config.d.
$ sudo sshd -t
No output means the files parsed successfully and the configured host keys passed the sanity check.
$ sudo sshd -t -f /root/test_sshd_config
Skip this step when the live file was edited directly.
$ sudo sshd -t /etc/ssh/sshd_config.d/90-sg-config-test.conf: line 1: Bad configuration option: NotARealDirective /etc/ssh/sshd_config.d/90-sg-config-test.conf: terminating, 1 bad configuration options
The output names the blocking file and line; correct that error before chasing later symptoms.
$ sudo sshd -t
$ sudo systemctl reload ssh
Use sudo systemctl reload sshd on systems that package the service as sshd.
Related: How to manage the SSH server service with systemctl
$ sudo systemctl is-active ssh active
Substitute sshd for ssh on systems that use the sshd unit name.
$ ssh user@host.example.net 'echo SSH configuration loaded' SSH configuration loaded