SaltyCrane Blog — Notes on JavaScript and web development

Notes on debugging ssh connection problems

  • Run the ssh client in verbose mode
    $ ssh -vvv user@host 
    
  • On the server, check auth.log for errors
    $ sudo tail -f /var/log/auth.log 
    

    On Red Hat, it's /var/log/secure

  • For more debugging info, (assuming you have control of the ssh server) run the sshd server in debug mode on another port
    $ sudo /usr/sbin/sshd -ddd -p 33333 
    
    Then specify the port, -p 33333 with the ssh client. e.g.
    $ ssh -vvv -p 33333 user@host 
    

Commands run on Ubuntu 10.04

sftp error: Received message too long 170160758

Problem was in the .bashrc. See http://www.snailbook.com/faq/sftp-corruption.auto.html

Comments