SSH:TDG
SSH: The Secure Shell (The Definitive Guide)
Barrett, Silverman, & Byrnes / O’Reilly

SSH Frequently Asked Questions

How do I debug SSH problems?


  • Add the -v switch to your SSH client command line, causing it to report verbosely on what it does. With OpenSSH, this switch may be repeated up to three times with increasing verbosity. With SSH2, there is a generic switch -d number, indicating a verbosity level; -v is a synonym for -d2.
  • Examine the SSH server logs. These will reported by syslog according the server's syslog configuration, often in /var/log/messages.
  • Run an instance of the server in debug mode, and test your connection against it:

    [on the server as root]
    # sshd -d -p 1234
    
    [on the client]
    $ ssh -p 1234 ...
    
When asking for help, e.g. in comp.security.ssh, be sure to include enough information to allow people to help you:
  • operating systems on the client and server hosts, and their versions
  • SSH software on the client and server hosts, and their versions
  • Exactly what you are trying to accomplish, and exact error messages you are getting, preferably quoted program output. Just saying, "I got an error!" is entirely useless.
  • Include all the output from the debugging steps given above, or as many as you can perform in your situation.