sshfs is failing with "remote host has disconnected"

You get a lot more information about the failure if you run sshfs as:

sshfs -odebug,sshfs_debug,loglevel=debug user@host ...

Usually this will give you something a lot more helpful to debug the problem.


It was requiring tty (this basically means something cannot be run in the background, but needs an active terminal window to run). So I added the following to /etc/sudoers (edited by doing visudo):

Defaults:basicuser !requiretty

I want it to not require tty only for that one command, but it may not be possible to do that: https://unix.stackexchange.com/a/80159