sshfs giving "remote host has disconnected"
Old question, but the first one that comes up for this problem.
My issue was the server required key authentication, but I was running the command using sudo
and specifying -o IdentityFile=~/.ssh/id_rsa
, meaning ~
was expanded to root's home, not mine.
Specifying the full path worked, and I imagine using $HOME
would have too (because it would have expanded earlier).
Your Subsystem
value in sshd_config
is wrong.
It should be Subsystem sftp /usr/lib/openssh/sftp-server
or internal-sftp
. Try to modify the /etc/ssh/sshd_config
to this value, restart the ssh service ans try once more.
You'll get this error if the remote server is running Dropbear rather than OpenSSH.
SSHFS uses SFTP, and Dropbear doesn't provide SFTP. So when you try to use it, the Dropbear server sees a request for a subsystem that it doesn't understand and drops the connection.
From here: https://unix.stackexchange.com/questions/363540/mount-a-filesystem-using-sshfs-using-the-dropbear-server-on-yocto-firmware