Hi, sorry to resurrect an old thread. I also had the problem, but found the solution on this blog post: http://websaucesoftware.com/ubuntu/s...n-ubuntu-10-04
It references the OpenSSH FAQ, which states:
2.9 – sftp/scp fails at connection, but ssh is OK.
sftp and/or scp may fail at connection time if you have shell initialization (.profile, .bashrc, .cshrc, etc) which produces output for non-interactive sessions. This output confuses the sftp/scp client. You can verify if your shell is doing this by executing:
ssh yourhost /usr/bin/true
If the above command produces any output, then you need to modify your shell initialization.
This solved it for me. I had 'bind' statements in my .bash_rc that produced this error:
.bashrc: line 249: bind: warning: line editing not enabled
Solved by detecting the presence of a terminal:
Code:
case "$TERM" in
xterm*|rxvt*)
bind "\"\C- \": \"git_prompt 'git commit -a'\n\""
bind "\"\C-x \": \"git_prompt 'git commit'\n\""
;;
esac
Bookmarks