8

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

1
  • Do you have control over the sshd? Jan 30 '17 at 13:23
6

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.

1
  • 2
    The -T switch is what I need, thank you for that.
    – Christian Waidner
    Jan 30 '17 at 14:55

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.