4

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)?

14

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.

  • 1
    That's the best answer. But also note that older versions of ssh shipped with an sshd_config file that contained all the defaults commented out. So worst case you could always get the distribution and look at that file. – user3188445 Jul 24 '15 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.