• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

sshfs and public keys

Red Squirrel

No Lifer
I'm trying to use sshfs to mount a share so I can share it through samba, as I cannot access a samba share over a NAT. So I have to mount it locally via ssh then access it locally from Windows.

This is the command I"m trying:

sshfs -p 22 -i=~/sshkeys/extsrv.loc filesync@extsrv.loc:/mnt/ravagerapplications . -o nonempty -o allow_other -o PasswordAuthentication=no

Does not seem to work. I get a log entry on the server of a connection then disconnection.

I also get this on the machine I'm trying to sshfs from:

read: Connection reset by peer


Anything I'm doing wrong in the command? I'm running this as root. (not sudo)
 
I've never used sshfs, but I have a few thoughts. First of all, I've never used multiple "-o" switches and I'm not sure if it's valid to do it that way. I would try combining all the options into one switch like this: "-o nonempty,allow_other,PasswordAuthentication=no"

Second thing is, you could add sshfs_debug to the options to, hopefully, get some sort of more descriptive error message. So your -o switch would look like this: "-o sshfs_debug,nonempty,allow_other,PasswordAuthentication=no"

Also, a quick google search suggests to make sure this line exists in your /etc/ssh/sshd_config:

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

You might also make sure that file exists.
 
If sshfs is anything like sftp you need to specify the port using -o Port=22 and not -p 22... then again why are you specifying the default port for ssh? It's default for a reason!
 
I tried seperating the options by a comma but I get more errors about those options being invalid. I was just basing it on examples I"ve seen.

Also I've noticed that when using ssh from another server it uses that server's default port (which was not 22 in my case.)
 
Originally posted by: RedSquirrel
I tried seperating the options by a comma but I get more errors about those options being invalid. I was just basing it on examples I"ve seen.

Also I've noticed that when using ssh from another server it uses that server's default port (which was not 22 in my case.)

The port is specified in /etc/ssh/ssh_config for the ssh client program. You probably changed the port in there thinking it was sshd_config by accident.
 
Originally posted by: RedSquirrel
I tried seperating the options by a comma but I get more errors about those options being invalid. I was just basing it on examples I"ve seen.

Also I've noticed that when using ssh from another server it uses that server's default port (which was not 22 in my case.)

hmm, well it was just a guess since every single mount command I've ever used worked that way, but as I said, I've never used sshfs.
 
Back
Top