Unable to mount SSHFS

I’m unable to mount Omnia’s directory over SSHFS. I have openssh-sftp-server installed on the router but trying to use SSHFS from my computer results in ‘Connection reset by peer’ error as seen below. Using sftp directly doesn’t work either.

$ mkdir -p /tmp/omnia
$ sshfs 192.168.0.127:/tmp /tmp/omnia/ -o debug
SSHFS version 3.7.1
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-2> <192.168.0.127> <-s> <sftp>
read: Connection reset by peer
$ sftp 192.168.0.127
Connection closed.  
Connection closed
$ ssh -v -x -a  -oClearAllForwardings=yes -2 192.168.0.127 -s sftp
OpenSSH_8.4p1 Debian-3, OpenSSL 1.1.1i  8 Dec 2020
...
debug1: Sending subsystem: sftp
subsystem request failed on channel 0

Does anyone have any idea what might be the issue?

I see you’re running sshfs under regular user. Is the local user also present at the turris? If not, maybe you want to create it, or, mount it with root permissions.

It’s the same user (name and id) on both machines:

$ id
uid=1000(mpn) gid=1000(mpn) groups=1000(mpn),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),108(netdev),113(bluetooth),117(scanner),125(libvirt)
$ ssh 192.168.0.127 id
uid=1000(mpn) gid=1000(mpn) groups=1000(mpn),0(root),2(wheel),100(users)

good. Then, running sshfs with debug options, sshfs -odebug,sshfs_debug,loglevel=debug turris:/ ./mp and checking logread at Turris could give us more info.

( for me the sshfs (root->root) is working out of the box so no clear idea, what’s wrong)

root→root doesn’t work either but this got me to look at /etc/config/sshd which had the following line commented out:

list Subsystem "sftp /usr/lib/sftp-server"

Uncommenting it fixed the issue.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.