Services and User Management

An administrator edited the Port directive in /etc/ssh/sshd_config on a remote server and must avoid a typo locking everyone out when the service restarts. Which command should be run BEFORE restarting the service to check the file for errors?

Show the answer

Correct answerA. sshd -t

sshd -t runs in test mode, validating the configuration file and exiting without starting the daemon. systemctl daemon-reload is tempting, but it only rereads systemd unit files and never parses sshd_config.