Display full settings of sshd

The OpenSSH daemon has many “default” values for its settings. So looking at the sshd_config might not give someone the complete set of active settings.

How to display the full sshd configuration (for OpenSSH)?

Asked By: Huygens


The OpenSSH sshd command has an extended test switch which can be used to “Check the validity of the configuration file, output the effective configuration to stdout and then exit.” (source sshd man page).

So the answer is (as root, or prefixing it with sudo):

sshd -T

(the settings are not in alphabetical order, one can use sshd -T | sort to quickly look for one setting, or just grep the setting) 🙂

PS: my first reflex was looking for this answer online, but the search engines were not helpful. And then only looked at the man page and found the answers. For those lazy like me which turns too quickly to the internet, there is now the answer posted online! Lesson learned today: check the man page first, ask a search engine later if needed.

Answered By: Huygens
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.