What's needed to use sshfs?

What’s needed to use sshfs? Eg something special to enable sftp? What’s best practice?
Both local and remote are tumbleweed:

  $  sshfs -p995 mnt/88
Enter passphrase for key '/home/me/.ssh/id_rsa':
read: Connection reset by peer
*  1$  sshfs -p995 -odebug,sshfs_debug,loglevel=debug mnt/88
Enter passphrase for key '/home/me/.ssh/id_rsa': 
Authenticated to ([]:995) using "publickey".
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session. 
debug1: pledge: network
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Remote: /home/me/.ssh/authorized_keys:10: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/me/.ssh/authorized_keys:10: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Sending environment.
debug1: channel 0: setting env LANG = "en_US.utf8"
debug1: channel 0: setting env LC_TIME = "en_DK.utf8"
debug1: Sending subsystem: sftp
subsystem request failed on channel 0 
read: Connection reset by peer

I have no experience w/ this, but I found (comment #5)



On my system, the sshfs package got pulled in by KDEConnect –

 > rpm --erase --test sshfs
error: Failed dependencies:
        sshfs >= 3.7.2 is needed by (installed) kdeconnect-kde-22.12.3-bp155.1.6.x86_64

There’s no man page but, “sshfs --help” spits out a load of information related to the options.

There is a man page on the network: <https://www.man7.org/linux/man-pages/man1/sshfs.1.html>
There’s also a Wikipedia entry: <https://en.wikipedia.org/wiki/SSHFS>

But, the ArchWiki entry is interesting: <https://wiki.archlinux.org/title/SSHFS>

Note: This project has been archived by its developers and is no longer developed. Alternatives include the mount feature of rclone.

Yeah, the git repo for fuse notes that sshfs is orphaned:

The troubleshooting info that I’ve found related to the request failed error suggests looking at the ssh logs on the server side, and that it may be a configuration issue on the server side.

On openSUSE the sshd daemon by default is configured with

Subsystem sftp /usr/libexec/ssh/sftp-server

maybe check if that’s the case on your target system.


Fascinatingly my tumbleweeds were installed with nothing in /etc/ssh/sshd_config. Upon adding Subsystem sftp /usr/libexec/ssh/sftp-server
sshfs works. Thanks to you who chipped in.


@gregrwm No it’s there, Tumbleweed merged etc items into /usr/etc…

fgrep -r sftp-server /usr/etc/*
/usr/etc/ssh/sshd_config:Subsystem	sftp	/usr/libexec/ssh/sftp-server

I also had no issues testing sshfs on Tumbleweed and MicroOS.

Mine also have /usr/etc/ssh, but /etc/libssh/libssh_server.config only contain

# Parse OpenSSH configuration file for consistency
Include /etc/ssh/sshd_config

so mine haven’t been using /usr/etc/ssh/sshd_config. And my /etc/ssh/sshd_config had nothing. Likely a config bug back when i installed sometime in 2022…likely got fixed sometime since then.

No, it is a bug introduced by /usr/etc move.

No, it is not fixed as you see and it will not be fixed until someone reports it.

The default configuration file for OpenSSH was moved to /usr/etc, but libssh was not updated to include it. You need to open bug report against libssh.

Bug Report: https://bugzilla.opensuse.org/show_bug.cgi?id=1211718


1 Like

Thank you, but usrmerge is something entirely different. This will be confusing to whoever reads this changelog in the future. There is no merging of /etc and /usr/etc.


- Add fix to spec file for wrong include path as a result of the
  default openSSH move to /usr/etc, (boo#1211718).

Thanks for patching it. I commented on the SR and wonder if it’s right to replace the /usr/etc include with an /etc one - if I understand correctly, both paths should be included, to combine packaged configurations with administrative/custom ones.

However I’m not sure if libssh supports overrides.


Hi All
I’ve also raised an issue upstream https://gitlab.com/libssh/libssh-mirror/-/issues/207

I think I might have found something on this, though not a full solution. Apparently, in OpenSSH 9.0, the scp program uses SFTP protocol under the hood. If the destination system doesn’t have sftp-server installed (or available, for example, if it’s using dropbear), then there may be an additional option needed.

For example, on scp, you need to use -O to force the legacy behavior.

I wonder if something similar may be needed to get sshfs to work using the legacy behavior rather than trying to use sftp.