↑ ↓ select, Enter open, Esc close

Show the effective sshd settings

root@server
sshd -T | grep -Ei '^(port|permitrootlogin|passwordauthentication|pubkeyauthentication|kbdinteractiveauthentication|allowusers|maxauthtries) '

sshd -T evaluates the complete configuration the way the service actually uses it and prints every option in lowercase. This is more reliable than looking at sshd_config because files in sshd_config.d/ and built-in defaults are taken into account. The filter shows the security-relevant options.

Note: Without the grep part, all options are shown. On syntax errors, the command aborts with an error message.

Also searched as

  • sshd -T show active config
  • check if root login is disabled
  • is ssh password authentication enabled

Related one-liners

All in SSH

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.