Saltycrane logo

SaltyCrane Blog

Notes on Python, Django, and web development on Ubuntu Linux

    

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

1 Comment — feed icon Comments feed for this post


#1 Test commented on 2012-02-21:

test

Post a comment

Required
Required, but not displayed
Optional

Format using Markdown. (No HTML.)
  • Code blocks: prefix each line by at least 4 spaces or 1 tab (and a blank line before and after)
  • Code span: surround with backticks
  • Blockquotes: prefix lines to be quoted with >
  • Links: <URL>
  • Links w/ description: [description](URL)
Created with Django | Hosted by Linode