\ Computer \ OS \ *Nix \ SSH \

SSH debug

Server

Effective SSHD config

grep -v "^#" /etc/ssh/sshd_config | grep -v "^$"

Test mode

-t only checks the validity of the configuration file and sanity of the keys. This is useful for updating sshd reliably as configuration options may change.

Try a parallel version of sshd on a different (open) port with debugging enabled:

/usr/sbin/sshd -ddd -p <listening port> [-h ~/.ssh/id_rsa] [-f /dev/null]
/bin/sshd -p <listening port> -D -d -e

-d is debug level. -dd is debug1, debug2. Messages will tail to the screen. Post-login details like environment variables will show up on the client.

Client

ssh -vvv -p <listening port> server-name
Updated: 2026 Aug 19