Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: sftp doesn't work while ssh works great

  1. #11
    Join Date
    Nov 2008

    Re: sftp doesn't work while ssh works great

    Reinstalled on my netbook. SFTP works fine. All I did was update ubuntu, install openssh-server, and test.
    So as for why it was broken on my netbook and my desktop . . . I guess some package I installed on both broke it? Or something like that? I'll test periodically to try and isolate the incompatible preference/behavior/action. Maybe it will be useful to someone.

  2. #12
    Join Date
    Nov 2008

    Re: sftp doesn't work while ssh works great

    Problem replicated on the clean install!

    All I did was install my normal packages using apt-get (about 20 of them).
    I'll go package by package tomorrow and submit a bug report.

    Okay that's enough of my monologue. Thanks for your help and have a good night.

  3. #13
    Join Date
    Nov 2009

    Re: sftp doesn't work while ssh works great

    Hi. I have some input, whereas I don't know if it holds to Your problem. Moreover I see, the post is already one year old, but it's the one that shows up as a first in google and can help some other people.

    I was logging to sftp server using Nautilus and all worked fine, unless I generated file with public keys in ~/.ssh/id_rsa. The key there was set with passphrase and after that Nautilus stopped working (connecting to server). Deleting this file helped again. I don't know how to go around the paassphrase (mine was set to blank), but maybe it helps somehow.


  4. #14
    Join Date
    Apr 2010
    New Zealand / Hong Kong
    Ubuntu 9.10 Karmic Koala

    Re: sftp doesn't work while ssh works great

    Hi, sorry to resurrect an old thread. I also had the problem, but found the solution on this blog post:

    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:

    case "$TERM" in
        bind "\"\C- \":  \"git_prompt 'git commit -a'\n\""
        bind "\"\C-x \": \"git_prompt 'git commit'\n\""

Page 2 of 2 FirstFirst 12


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts