« Back to SSH: Frequently Asked Questions

How to test the sshd configuration for configuration errors?

How to test the sshd configuration for configuration errors?

To test the SSH daemon (sshd) for configuration errors, run sshd with the '-t' option.

sshd -t

Before reloading the SSH configuration, perform a configuration test first. This may avoid locking yourself out of a remote system or break any existing communications between the server and any clients. Testing can be done using the sshd command. For this purpose, it has the -t option available.

Command line usage

To use this option on the command line, run the following command:

sshd -t

Other questions related to SSH

    Related articles

    Like to learn more? Here is a list of articles within the same category or having similar tags.

    Feedback

    Small picture of Michael Boelen

    This article has been written by our Linux security expert Michael Boelen. With focus on creating high-quality articles and relevant examples, he wants to improve the field of Linux security. No more web full of copy-pasted blog posts.

    Discovered outdated information or have a question? Share your thoughts. Thanks for your contribution!

    Mastodon icon