Increasing SSH client verbosity exposes the stage where a connection starts to fail, which makes it easier to separate name resolution, TCP reachability, host key checks, and authentication problems from remote shell issues. When the same host works from one machine but not another, the client debug lines usually show exactly where the connection path diverges.

The OpenSSH client raises its own log level when -v is added to the command line, and repeating the flag up to three times expands the output from debug1 to debug3 detail. The same behavior can be applied to a matching Host entry in ~/.ssh/config with LogLevel, while remote command output still appears separately from the client messages.

Verbose mode fits troubleshooting and short verification runs instead of routine automation or pasted support logs. The output can expose usernames, key paths, hostnames, and host key details, so a persistent LogLevel DEBUG3 setting should stay limited to a specific host match instead of a broad pattern such as Host *.

Steps to increase SSH client verbosity:

  1. Run ssh with -v to enable basic client-side diagnostics for one connection.
    $ ssh -v user@host.example.net hostname
    OpenSSH_9.6p1 Ubuntu-3ubuntu13.15, OpenSSL 3.0.13 30 Jan 2024
    debug1: Reading configuration data /home/user/.ssh/config
    debug1: Connecting to host.example.net [203.0.113.50] port 22.
    debug1: Connection established.
    debug1: Authenticating to host.example.net:22 as 'user'
    ##### snipped #####
    host

    -v raises the client log level to debug1 for that command only, which is usually enough to confirm the target host, port, and authentication path.

  2. Repeat the flag as -vv when the debug1 output is not detailed enough.
    $ ssh -vv user@host.example.net hostname
    OpenSSH_9.6p1 Ubuntu-3ubuntu13.15, OpenSSL 3.0.13 30 Jan 2024
    debug1: Reading configuration data /home/user/.ssh/config
    debug2: fd 3 setting O_NONBLOCK
    debug1: Connecting to host.example.net [203.0.113.50] port 22.
    debug1: Connection established.
    ##### snipped #####
    host

    -vv adds debug2 messages for resolver, key exchange, and channel setup decisions that are hidden at the lower level.

  3. Use -vvv for the most verbose command-line output during stubborn connection failures.
    $ ssh -vvv user@host.example.net hostname
    OpenSSH_9.6p1 Ubuntu-3ubuntu13.15, OpenSSL 3.0.13 30 Jan 2024
    debug1: Reading configuration data /home/user/.ssh/config
    debug2: fd 3 setting O_NONBLOCK
    debug3: channel_clear_timeouts: clearing
    debug3: ssh_connect_direct: entering
    debug1: Connecting to host.example.net [203.0.113.50] port 22.
    debug3: set_sock_tos: set socket 3 IP_TOS 0x10
    debug1: Connection established.
    ##### snipped #####
    host

    -vvv can print host key fingerprints, preferred algorithms, and local file paths, so it is best used temporarily and trimmed before sharing logs.

  4. Open the per-user SSH client configuration file if the higher log level should apply automatically to the same host.
    $ nano ~/.ssh/config

    Create ~/.ssh/config first if it does not already exist, and keep the file readable only by the local account.

  5. Add LogLevel DEBUG3 to the matching Host block when the same destination should always use the most detailed client diagnostics.
    Host host.example.net
      LogLevel DEBUG3

    Current OpenSSH accepts DEBUG, DEBUG1, DEBUG2, and DEBUG3 for LogLevel, with DEBUG and DEBUG1 being equivalent and DEBUG3 producing the most detail.

  6. Inspect the resolved client settings to confirm that the host now uses the higher log level.
    $ ssh -G host.example.net
    host host.example.net
    user user
    hostname host.example.net
    port 22
    ##### snipped #####
    loglevel DEBUG3

    ssh -G prints the merged client configuration after command-line options, ~/.ssh/config, and /etc/ssh/ssh_config are combined.

  7. Connect to the same host again to apply the higher verbosity without repeating -vvv on every command.
    $ ssh host.example.net hostname
    debug3: channel_clear_timeouts: clearing
    debug3: ssh_connect_direct: entering
    debug1: Connecting to host.example.net [203.0.113.50] port 22.
    debug3: set_sock_tos: set socket 3 IP_TOS 0x10
    debug1: Connection established.
    ##### snipped #####
    host

    A broad match such as Host * with LogLevel DEBUG3 adds noisy diagnostics to every SSH-based tool that reads the same client configuration, including scp and sftp.