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 portThen specify the port,
$ sudo /usr/sbin/sshd -ddd -p 33333
-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
Related posts
- Notes on Fabric 2 and Python 3 — posted 2021-02-07
- How to expose a Flask local development server to the public using SSH remote port forwarding — posted 2013-02-12
- How to run a Django local development server on a remote machine and access it in your browser on your local machine using SSH port forwarding — posted 2012-10-23
- Fabric post-run processing Python decorator — posted 2010-11-06
- Class-based Fabric scripts via a Python metaprogramming hack — posted 2010-09-23