I've had a server running CentOS for a few months now. A few days ago, I stopped being able to connect to it over SFTP. I've tried from multiple computers, OSes, clients, and internet connections. I can SSH in just fine, though. For example, Nautilus gives me this:

Error: DBus error org.freedesktop.DBus.Error.NoReply:
Did not receive a reply. Possible causes include: the
remote application did not send a reply, the message bus
security policy blocked the reply, the reply timeout
expired, or the network connection was broken.
Please select another viewer and try again.

I was under the impression that SFTP was just pure SSH, and if one worked, the other would, and vice-versa. Clearly that's not the case, though. What could I have done wrong?

  • Hmm.. there's not enough information to determine what went wrong.. could be a number of reasons.. what has changed a few days ago?
    – sybreon
    Aug 28 '11 at 10:55
  • I haven't really done anything. It only runs Apache, and I don't really change things other than web pages. I hadn't SSH'd in for a week or so prior to this problem.
    – Dan
    Aug 28 '11 at 10:58
  • 1
    Try sftp -v <user>@<host> from a terminal — it should at least give some useful error messages in case of a problem. Aug 28 '11 at 11:09
  • Strange... That works just fine. Now I'm REALLY confused.
    – Dan
    Aug 28 '11 at 11:29
  • 1
    Sounds more like a communication issue with Nautilus from what information is posted. Perhaps some other component is malfunctioning. Aug 28 '11 at 13:44

Just adding this in case somebody else stumbles upon this.

I was having a similar problem wherein SSH was working but SFTP wasn't.

Here's the entry from the OpenSSH FAQ that helped.

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.

In my case I had something in my .bashrc

I added the following at the end of the command to stop the output from it.

> /dev/null 2>&1

  • Thanks - Wondered why all my IDEs using SFTP had stopped working and cowsay in my bashrc was the culprit all along.
    – idea_
    Dec 24 '16 at 7:40
  • does bash: /usr/bin/true: No such file or directory count as output? Aug 12 '17 at 1:20
  • On ubuntu it's /bin/true but nothing was output and my problem was not solved Aug 12 '17 at 1:30

If SSH client normaly connects to SSH server, there should be file transfer normally available. It seems that problem is with your SFTP client. You can try to use scp (on linux) or pscp (putty scp on windows) to test file transfer and troubleshoot :) Also you can try to use FileZilla as GUI application for SFTP.

Note that there is also FTPS protocol which is FTP that uses certificates (like HTTPS)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.