Get configuration of running sshd

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

1 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.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like