how I can verify the sshd configuration ? example:
AllowUsers user1 user2
PasswordAuthentication no
PermitRootLogin no
the only way is reading the file sshd_configuration ?
|
how I can verify the sshd configuration ? example:
the only way is reading the file |
|||
|
|
While this won't dump all your server definitions, you can try connecting to the server with a verbose debug flag: For example, take a look on the output of this connection with the -v switch (key signatures, domain and IP addresses purposely disguised):
From that you can see the allowed authentication methods are: publickey,password,keyboard-interactive. You can also see that roaming is not allowed by this server, and that user claudio could connect using his public key. You can increase the level of information output specifying more "v" letters, but then you may get way more low level information than you probably want. |
||||
|
|
|
sshd's configuration is typically found in the following file: |
|||||||||
|
|
there is no known way of querying the config of a running sshd instance, i think, if you are referring the openssh server. depending on what you want to do, you could use the -t flag to test a configuration file to make sure that it is valid before restarting the server, so that you don't get kicked out, esp. if you do not have any out-of-band access to the server. |
|||
|
|