Is it possible to get a list of all the currently active configuration options of a running sshd task? Something like connecting, using a command via ssh and then disconnect?
I know I can read the configuration file and derive from there but:
- There are options with defaults which are not explicitely set in the sshd_config
- Finding the correct config file is not always easy (as it can be changed)
- There are commandline options overriding sshd_config
- ... ?
Thanks for your help
11 Answer
It is not possible to dump the configuration from running sshd, but you can instruct the sshd to parse the configuration and dump the resulting applied configuration options including default values from the default configuration file. There is -T switch for that.
There are commandline options overriding sshd_config
You can use -f switch to read the configuration file from different file.
Everything is well documented in manual page for sshd.