You are not logged in.

#1 2019-11-09 01:48:21

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

[SOLVED] Problems with mounting a remote drive using sshfs

I'm trying to remotely mount a drive on my local network using sshfs. I have sshfs and fuse and I have been following the ArchWiki page on SSHFS. When I tried to run

sudo sshfs cassidy@192.168.1.9:/ /mnt

I get a prompt for the password, I enter it, and then I get this:

read: Connection reset by peer

This seems to be a somewhat common error, seeing as it has it's own troubleshooting section on the SSHFS page, so I start going through the troubleshooting suggestions.

  • I'm already using the drive's IP instead of the hostname

  • I'm not using any keys

  • As far as I know "/root/.ssh/config" isn't a symlink

  • My router isn't running DD-WRT

  • I'm not seeing it only on boot

  • This old thread was useless

  • I'm allowed to log into the server. I've been able to SSH into it multiple times.

  • "Subsystem sftp /usr/lib/ssh/sftp-server" is enabled in "/etc/ssh/sshd_config"

The only thing out of this list that was somewhat helpful was passing "-o sshfs_debug" as an option for sshfs. It gives me this new error, before the "Connection reset by peer" one

subsystem request failed on channel 0

Last edited by PopeRigby (2019-11-13 03:00:24)

Offline

#2 2019-11-09 01:51:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,406
Website

Re: [SOLVED] Problems with mounting a remote drive using sshfs

PopeRigby wrote:
  • "Subsystem sftp /usr/lib/ssh/sftp-server" is enabled in "/etc/ssh/sshd_config"

This is the case on the host machine (192.168.1.9) right, not the client?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2019-11-09 02:01:00

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 16,866

Re: [SOLVED] Problems with mounting a remote drive using sshfs

ewaller@odin/home/ewaller % sshfs ewaller@router.lan:/tmp/mnt/sda4 mnt
ewaller@router.lan's password: 
ewaller@odin/home/ewaller % ls mnt
lost+found  Storage
ewaller@odin/home/ewaller % umount mnt
ewaller@odin/home/ewaller % ls mnt
ewaller@odin/home/ewaller % 

It does work here.  My router is running Asus Merlin.  I did not use root as I am mounting it on a mount point owned by me.  I am not using public keys for the router -- the ssh port it is only visible on the LAN Side.

Can you ssh to the router using sudo? 
Are you using public keys or passwords? 
Are you challenged for a password?
Do you need to mount it as root?  Can you use a user owned mount point?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2019-11-09 02:22:13

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Trilby wrote:
PopeRigby wrote:
  • "Subsystem sftp /usr/lib/ssh/sftp-server" is enabled in "/etc/ssh/sshd_config"

This is the case on the host machine (192.168.1.9) right, not the client?

This is the case on the client, do I need to set that on the host as well?

ewaller wrote:
ewaller@odin/home/ewaller % sshfs ewaller@router.lan:/tmp/mnt/sda4 mnt
ewaller@router.lan's password: 
ewaller@odin/home/ewaller % ls mnt
lost+found  Storage
ewaller@odin/home/ewaller % umount mnt
ewaller@odin/home/ewaller % ls mnt
ewaller@odin/home/ewaller % 

It does work here.  My router is running Asus Merlin.  I did not use root as I am mounting it on a mount point owned by me.  I am not using public keys for the router -- the ssh port it is only visible on the LAN Side.

Can you ssh to the router using sudo?

Yes, I can.

Are you using public keys or passwords?

Passwords

Are you challenged for a password?

Yeah, I am.

Do you need to mount it as root?  Can you use a user owned mount point?

I tried that. I gave me the exact same errors.

Offline

#5 2019-11-09 02:28:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,406
Website

Re: [SOLVED] Problems with mounting a remote drive using sshfs

PopeRigby wrote:

This is the case on the client, do I need to set that on the host as well?

Yes.  The client setting of this is irrelevant: this is a setting that is needed on the server.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2019-11-09 02:45:46

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Trilby wrote:
PopeRigby wrote:

This is the case on the client, do I need to set that on the host as well?

Yes.  The client setting of this is irrelevant: this is a setting that is needed on the server.

"Subsystem sftp /usr/lib/ssh/sftp-server" is enabled in "/etc/ssh/sshd_config" on the client and the host now. It still won't work.

Last edited by PopeRigby (2019-11-09 02:46:16)

Offline

#7 2019-11-09 08:18:39

seth
Member
Registered: 2012-09-03
Posts: 13,118

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Did you restart the ssh server on the host?

Offline

#8 2019-11-09 12:42:07

koffeinfriedhof
Member
Registered: 2017-11-30
Posts: 33

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Try sshfs -d for some debug messages.

Why do you use sudo sshfs ? Perhaps you messed up some user rights?

Did you made any changes in /etc/fuse.conf?

Offline

#9 2019-11-10 03:22:55

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

koffeinfriedhof wrote:

Try sshfs -d for some debug messages.

That didn't give me anything useful. Just the same old 'connection reset by peer' message.

Why do you use sudo sshfs ? Perhaps you messed up some user rights?

I supposed I don't need to do that. I was using it to see if that would help and forgot to stop.

Did you made any changes in /etc/fuse.conf?

Nope.

Offline

#10 2019-11-10 03:23:58

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

seth wrote:

Did you restart the ssh server on the host?

I did not. I'll have to figure out how to do that. I'm using one of those Synology drives.

Offline

#11 2019-11-10 03:29:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 22,406
Website

Re: [SOLVED] Problems with mounting a remote drive using sshfs

If nothing else, reboot it.  But at this point, this isn't really an arch linux question as the problem stems from configuring the server which is (apparently) running another OS.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2019-11-10 06:55:15

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Trilby wrote:

If nothing else, reboot it.  But at this point, this isn't really an arch linux question as the problem stems from configuring the server which is (apparently) running another OS.

You're right. I'll close it if I can figure out that it's unrelated to Arch.

Offline

#13 2019-11-13 02:59:57

PopeRigby
Member
Registered: 2019-10-19
Posts: 29

Re: [SOLVED] Problems with mounting a remote drive using sshfs

Alright, I fixed it by installing openssh-sftp-server on the drive using ipkg.

Offline

Board footer

Powered by FluxBB