Which command would restart the SSH daemon to apply configuration changes?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command would restart the SSH daemon to apply configuration changes?

Explanation:
Managing the SSH daemon with systemd is the standard approach on modern Red Hat systems. Restarting the service stops the current sshd process and starts it again, which guarantees that all configuration changes are fully loaded and that every part of the daemon starts fresh with the new settings. This is why the restart command is the best choice here. Using a reload would ask sshd to re-read its configuration without fully restarting, which is faster and sufficient for many changes, but not for every one. Some settings (such as port changes or key-related changes) require a full restart to take effect, so restarting is the most reliable way to apply all config updates. The other options either invoke older init-style scripts or rely on a less explicit path, which isn’t the recommended method on a systemd-based system. In short, systemctl restart sshd is the correct, reliable way to ensure all changes are applied.

Managing the SSH daemon with systemd is the standard approach on modern Red Hat systems. Restarting the service stops the current sshd process and starts it again, which guarantees that all configuration changes are fully loaded and that every part of the daemon starts fresh with the new settings. This is why the restart command is the best choice here.

Using a reload would ask sshd to re-read its configuration without fully restarting, which is faster and sufficient for many changes, but not for every one. Some settings (such as port changes or key-related changes) require a full restart to take effect, so restarting is the most reliable way to apply all config updates.

The other options either invoke older init-style scripts or rely on a less explicit path, which isn’t the recommended method on a systemd-based system. In short, systemctl restart sshd is the correct, reliable way to ensure all changes are applied.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy