\\sshfs\user@mylinuxserver fails

5,507 views
Skip to first unread message

Craig Hollabaugh

unread,
Jul 13, 2017, 8:56:31 PM7/13/17
to WinFsp
Folks,

I'm running win7_64 professional, I installed winfsp (I also have standard cygwin installed) and rebooted. When I try to map to drive to \\sshfs\user@mylinuxserver, windows tries to mount a server named sshfs.  Advice is welcomed here.  I'm forced to use a win7 machine for project and need to share files to it from my ubuntu server. Thanks,

Craig



bill...@navimatics.com

unread,
Jul 13, 2017, 11:08:58 PM7/13/17
to WinFsp
Hi, Craig:

You need both SSHFS-Win and WinFsp in order for the \\sshfs\user@server syntax to work. Do you have SSHFS-Win installed?

You can get SSHFS-Win from this location:

Craig Hollabaugh

unread,
Jul 13, 2017, 11:17:09 PM7/13/17
to Bill Zissimopoulos, WinFsp
Yes, I have both installed ( I should have mentioned this ). After install, do I need to have an exe running or should the OS know how to deal with the \\sshfs device from the install?


--
You received this message because you are subscribed to a topic in the Google Groups "WinFsp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/winfsp/8RsLm_Ye-OQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to winfsp+unsubscribe@googlegroups.com.
To post to this group, send email to win...@googlegroups.com.
Visit this group at https://groups.google.com/group/winfsp.
For more options, visit https://groups.google.com/d/optout.



--

Bill Zissimopoulos

unread,
Jul 13, 2017, 11:22:28 PM7/13/17
to Craig Hollabaugh, WinFsp
Craig:

If you are familiar with the command line at all, perhaps you can do the following for me:
  • Open a Command Prompt
  • Navigate to this directory C:\Program Files (x86)\WinFsp\bin
  • There is a batch file called diag.bat. Run it and send me the output.
Bill

Craig Hollabaugh

unread,
Jul 13, 2017, 11:30:39 PM7/13/17
to WinFsp, holl...@gmail.com
here's diag.out
diag.out

Craig Hollabaugh

unread,
Jul 13, 2017, 11:48:18 PM7/13/17
to WinFsp, holl...@gmail.com
Bill, I've been around hacking since 1979 and can run anything on windows you need. 

Bill Zissimopoulos

unread,
Jul 13, 2017, 11:49:57 PM7/13/17
to Craig Hollabaugh, WinFsp
Thanks. The diagnostic output looks correct, which makes this failure somewhat curious.

Try the following and let me know what happens:
  • Open a command prompt.
  • cd C:\Program Files (x86)\SSHFS-Win\bin
  • set CYGFUSE=WinFsp
  • set PATH=C:\Program Files (x86)\SSHFS-Win\bin
  • sshfs.exe -f -o idmap=user USER@SERVER: y:
Replace USER and SERVER with your user name and server name. Make sure you type the colon (:) as in USER@SERVER:

If everything works ok you should see something along the lines of:

Could not create directory '/home/USER/.ssh'.
The authenticity of host ‘XXXX' can't be established.
ECDSA key fingerprint is SHA256:YYYY.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/USER/.ssh/known_hosts).
Password:
The service sshfs has been started.

Bill


On 7/13/17, 8:30 PM, win...@googlegroups.com on behalf of Craig Hollabaugh wrote:

here's diag.out

--
You received this message because you are subscribed to the Google Groups "WinFsp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to winfsp+un...@googlegroups.com.

Bill Zissimopoulos

unread,
Jul 13, 2017, 11:51:10 PM7/13/17
to Craig Hollabaugh, WinFsp
Fantastic :-D Thank you!


On 7/13/17, 8:48 PM, win...@googlegroups.com on behalf of Craig Hollabaugh wrote:

Bill, I've been around hacking since 1979 and can run anything on windows you need. 

--
You received this message because you are subscribed to the Google Groups "WinFsp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to winfsp+un...@googlegroups.com.

Craig Hollabaugh

unread,
Jul 14, 2017, 12:07:44 AM7/14/17
to Bill Zissimopoulos, WinFsp
OK, that worked but here's a couple things. ssh says it can't create /home/User/.ssh directory, then asks my to accept the fingerprint. 

/homeUser/.ssh exists, 
drwxr-xr-x+ 1 holla None    0 Jul 13 22:02 .ssh

because my put my keys in there.

if I kill sshfs, then run it again. it asks my to approve the fingerpint again, so ssh can't write to known_hosts.

if I move my .ssh dir, I get the same result. sshfs doesn't create /home/User/.ssh

mapping a network drive is also not functional

we're getting close.

Bill Zissimopoulos

unread,
Jul 14, 2017, 12:45:39 AM7/14/17
to Craig Hollabaugh, WinFsp
On 7/13/17, 9:07 PM, win...@googlegroups.com on behalf of Craig Hollabaugh wrote:

OK, that worked but here's a couple things. ssh says it can't create /home/User/.ssh directory, then asks my to accept the fingerprint. 

/homeUser/.ssh exists, 
drwxr-xr-x+ 1 holla None    0 Jul 13 22:02 .ssh

because my put my keys in there.

if I kill sshfs, then run it again. it asks my to approve the fingerpint again, so ssh can't write to known_hosts.

if I move my .ssh dir, I get the same result. sshfs doesn't create /home/User/.ssh

This is by design. SSHFS-Win uses its own mini-Cygwin environment that is not related to the main Cygwin that you have installed in your computer. The /home/User/.ssh that it is referring to is not the same as the one under your main Cygwin installation.

If you would rather not see those messages pass these options when you invoke sshfs:
-oUserKnownHostsFile=/dev/null
-oStrictHostKeyChecking=no

mapping a network drive is also not functional

Yes, this is perplexing. I do not have a good answer for why this is so. Let me think about it and see if I can come up with a potential explanation for this behavior.

At the very least we now know that the file system itself works.

Bill

Craig Hollabaugh

unread,
Jul 14, 2017, 12:48:53 AM7/14/17
to Bill Zissimopoulos, WinFsp
The functionality you provided this evening is working great, I'm back to work on a python module using cygwin with my Y: mounted linux home directory. yay! Thanks. 

Bill Zissimopoulos

unread,
Jul 14, 2017, 4:25:28 PM7/14/17
to Craig Hollabaugh, WinFsp
> The functionality you provided this evening is working great, I'm back to work on
> a python module using cygwin with my Y: mounted linux home directory. yay! Thanks. 

Craig, I am glad.

I would still like to understand why you are unable to launch SSHFS using the “map network drive” functionality.

If you try the command `net use y: \\sshfs\USER@Server` what is the error message that you get? Also consider looking in the Event Viewer, WinFsp will often place informative messages on failures there.

Bill

Craig Hollabaugh

unread,
Jul 15, 2017, 11:37:23 PM7/15/17
to Bill Zissimopoulos, WinFsp
net use replies with 

Enter the user name for 'sshfs'

Bill Zissimopoulos

unread,
Jul 17, 2017, 4:57:55 PM7/17/17
to Craig Hollabaugh, WinFsp
On 7/15/17, 8:37 PM, Craig Hollabaugh wrote:

net use replies with 

Enter the user name for 'sshfs'


Interesting. SSHFS requires username and password, which is why `net use` is asking for those. Out of curiosity: have you tried entering your Linux username and password to `net use` to see if that works?

Normally when you launch SSHFS from the Explorer, there should be a username/password dialog box that pops up asking for your credentials. Perhaps this does not work under Windows 7 Explorer for some reason.

Bill

Craig Hollabaugh

unread,
Jul 17, 2017, 5:03:29 PM7/17/17
to Bill Zissimopoulos, WinFsp
I'll try this this evening.

Craig Hollabaugh

unread,
Jul 18, 2017, 12:27:36 AM7/18/17
to Bill Zissimopoulos, WinFsp
here's a couple runs

C:\Users\User>net use y: \\sshfs\ho...@192.168.0.2\
The password is invalid for \\sshfs\ho...@192.168.0.2\.

Enter the user name for 'sshfs': holla
Enter the password for sshfs:
System error 67 has occurred.

The network name cannot be found.

C:\Users\User>net use y: \\sshfs\192.168.0.2\ /user:holla
The password is invalid for \\sshfs\192.168.0.2\.

Enter the password for 'holla' to connect to 'sshfs':
System error 67 has occurred.

The network name cannot be found.

what next?

my batch works great btw

C:\Users\User>more m.bat
cd C:\Program Files (x86)\SSHFS-Win\bin
set CYGFUSE=WinFsp
set PATH=C:\Program Files (x86)\SSHFS-Win\bin
sshfs.exe -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no -f -o idmap=user ho...@192.168.0.2: y:
exit

Bill Zissimopoulos

unread,
Jul 18, 2017, 2:49:18 PM7/18/17
to Craig Hollabaugh, WinFsp
Just to make sure that it is not something trivial. Can you also try with

net use y: \\sshfs\ho...@192.168.0.2

[Without the \ or \. at the end?]

The fact that the file system works correctly, but it cannot be mapped using `net use`, most likely indicates some kind of bug in the “network provider” under Win7. I will try to reproduce and investigate.

Bill

Craig Hollabaugh

unread,
Jul 18, 2017, 3:37:45 PM7/18/17
to Bill Zissimopoulos, WinFsp
tried that last evening, with and without trailing backslash, same result. I posted 2 attempts I tried all sorts of combination, like using -user with and without \\holla@192.* kind of thing. same result. thanks for looking in this. keep in mind, its not a big rush. your help so far has a work around that I use everyday. Thanks. 

ingo...@gmail.com

unread,
Jul 26, 2018, 4:31:18 PM7/26/18
to WinFsp
Trying to connect to a FreeBSD machine from Win10:
Using explorer fails.

Connecting to an androidphone by ip-address, running primitive ftpd in sftp mode, works fine from explorer.


C:\Users\ingo>net use y: \\sshfs\in...@bsdbeest.local
Wachtwoord is niet geldig voor \\sshfs\in...@bsdbeest.local.
Password is not valid for:

Geef de gebruikersnaam (user name) voor 'sshfs' op: ingo
Geef het wachtwoord (password) voor sshfs op:
Systeemfout (system error) 5.

Toegang geweigerd. (acces denied)


trying to access the exact same machine by ip:

C:\Users\ingo>net use y: \\sshfs\in...@192.168.1.100
Wachtwoord is niet geldig voor \\sshfs\in...@192.168.1.100.

Geef de gebruikersnaam voor 'sshfs' op: ingo
Geef het wachtwoord voor sshfs op:
Systeemfout 67.

Kan de netwerknaam niet vinden.
Can't find network name


This batfile works fine:
cd c:\program files\sshfs-win\bin
set CYGFUSE=WinFSP
set PATH=C:\Program Files\SSHFS-Win\bin
sshfs.exe -oUserKnownHostFile=/dev/null -oStrictHostKeyChecking=no -f -o idmap=user in...@192.168.1.100: y:

Using the host name instead of ip not:
c:\Program Files\SSHFS-Win\bin>sshfs.exe -oUserKnownHostFile=/dev/null -oStrictHostKeyChecking=no -f -o idmap=user in...@bsdbeest.local: y:
ssh: Could not resolve hostname bsdbeest.local: Name or service not known
read: Connection reset by peer

Ingo (not confident from cmd or BSD)

Bill Zissimopoulos

unread,
Jul 26, 2018, 8:16:12 PM7/26/18
to ingo...@gmail.com, WinFsp

Does plain ssh into bsdbeest.local with the same credentials work?

--

You received this message because you are subscribed to the Google Groups "WinFsp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to winfsp+un...@googlegroups.com.

ingo janssen

unread,
Jul 27, 2018, 1:40:00 AM7/27/18
to WinFsp


Op 2018-07-27 om 02:16 schreef Bill Zissimopoulos:
> Does plain ssh into bsdbeest.local with the same credentials work?
>

No
ssh: Could not resolve hostname bsdhost.local: Name or service not known

ssh to the ip works fine
sftp to ip with filezilla works fine

Ingo

ingo janssen

unread,
Jul 27, 2018, 2:28:24 AM7/27/18
to WinFsp
in addition, in Explorer it looks a bit strange to me how the Android
phone is in the listing under Network, as if sshfs is box it is
connected to. Couldn't find a screenshot of how it should look:

v .. Network
.. > .. A_Box
.. > .. B_Box
.. > .. sshfs
.... > .. f...@192.168.1.9!1212


Ingo
Reply all
Reply to author
Forward
0 new messages