Giter VIP home page Giter VIP logo

sshfs-win's Introduction

WinFsp · Windows File System Proxy



WinFsp enables developers to write their own file systems (i.e. "Windows drives") as user mode programs and without any knowledge of Windows kernel programming. It is similar to FUSE (Filesystem in Userspace) for Linux and other UNIX-like computers.

winfsp.dev






Overview

WinFsp is a platform that provides development and runtime support for custom file systems on Windows computers. Typically any information or storage may be organized and presented as a file system via WinFsp, with the benefit being that the information can be accessed via the standand Windows file API’s by any Windows application.

The core WinFsp consists of a kernel mode file system driver (FSD) and a user mode DLL. The FSD interfaces with the Windows kernel and handles all interactions necessary to present itself as a file system driver. The DLL interfaces with the FSD and presents an API that can be used to handle file system functions. For example, when an application attempts to open a file, the file system receives an Open call with the necessary information.

Using WinFsp to build a file system has many benefits:

Easy development: Developing kernel mode file systems for Windows is a notoriously difficult task. WinFsp makes file system development relatively painless. This Tutorial explains how to build a file system.

Stability: Stable software without any known kernel mode crashes, resource leaks or similar problems. WinFsp owes this stability to its Design and its rigorous Testing Regime.

Correctness: Strives for file system correctness and compatibility with NTFS. For details see the Compatibility document.

Performance: Has excellent performance that rivals or exceeds that of NTFS in many file system scenarios. Read more about its Performance.

Wide support: Supports Windows 7 to Windows 11 and the x86, x64 and ARM64 architectures.

Flexible API: Includes Native, FUSE2, FUSE3 and .NET API's.

Shell integration: Provides facilities to integrate user mode file systems with the Windows shell. See the Service Architecture document.

Self-contained: Self-contained software without external dependencies.

Widely used: Used in many open-source and commercial applications with millions of installations (estimated: the WinFsp project does not track its users).

Flexible licensing: Available under the GPLv3 license with a special exception for Free/Libre and Open Source Software. A commercial license is also available. Please contact Bill Zissimopoulos <billziss at navimatics.com> for more details.

Installation

Download and run the WinFsp installer. In the installer select the option to install the "Developer" files. These include the MEMFS sample file system, but also header and library files that let you develop your own user-mode file system.

Launch a file system for testing

You can test WinFsp by launching MEMFS from the command line:

billziss@xps ⟩ ~ ⟩ net use X: \\memfs64\test
The command completed successfully.

billziss@xps ⟩ ~ ⟩ X:
billziss@xps ⟩ X:\ ⟩ echo "hello world" > hello.txt
billziss@xps ⟩ X:\ ⟩ dir


    Directory: X:\


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         6/12/2022   5:15 PM             28 hello.txt


billziss@xps ⟩ X:\ ⟩ type hello.txt
hello world
billziss@xps ⟩ X:\ ⟩ cd ~
billziss@xps ⟩ ~ ⟩ net use X: /delete
X: was deleted successfully.

MEMFS (and all file systems that use the WinFsp Launcher as documented in the Service Architecture document) can also be launched from Explorer using the "Map Network Drive" functionality.

Resources

Documentation:

Discussion:

sshfs-win's People

Contributors

4o4 avatar anthony-arnoux avatar billziss-gh avatar brianmarre avatar daladim avatar dcourcel avatar djstompzone avatar endolith avatar felipecrs avatar leadroyal avatar minidron avatar swift42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sshfs-win's Issues

Errors while navigating on remote, bad characters

I have a Home Server with a RAID5 disk mounted as /mnt/md-name-HomeServer:0, symlinked as /storage for an easier access.

From windows 10 explorer, using sshfs-win and WinFsp, "md-name-HomeServer:0" is spelled as "md-name-HomeServer0", with the weird character having HEX representation F03A (converted from directory name with the help of notepad++ converter).

This apparently causes troubles, because if I navigate /mnt/md-name-HomeServer0/data, I can access /data subfolder, but if I go through /storage, I can see the data subfolder, but can't navigate inside it ("wrong syntax" error).

Unable to disconnect

First of all thanks for the great peace of work!
We are replacing SMB in our organisation bi SFTP/SSH for some shares since our nopetya attack last year.

One thing is not working for me:
Disconnection from explorer (right click: disconnect) or with using net use Z: /d
The connection stays there.
I do get a message Z: removed but it is still there.
I am using Windows 10-64

[EDIT] found this in FAQ:
You may have Dokany installed. Dokany installs its own Network Provider DLL that unfortunately interferes with the WinFsp handling of network drives. The solution is to change your system's Network Provider order and ensure that the WinFsp Network Provider runs before the Dokany one. Instructions on how to change the Network Provider order can be found in this http://blogs.interfacett.com/changing-the-network-provider-order-in-windows-10

Some minor second issue:
When I rename the connection in explorer I am able to do this but only once.
As soon as I try to rename it again I cannot rename it using more than 11 characters.

Am I the only one or more people are facing this issue.
Thank KB

Mounting and unmounting too complicated

After spending 2 days of trial and error to mount and unmount with SSHFS-Win, I'm sharing the results here.

My solution consists of 3 scripts, one of which is only a helper script. In my example the authentication is handled by the ssh agent from Keepass's plugin KeeAgent.

start /B cmd /C "set "SSH_AUTH_SOCK=C:\msys64\home\xelra\.ssh\KeeAgent.socket" && set "CYGFUSE=WinFsp" && set "PATH=C:\Program Files (x86)\SSHFS-Win\bin;%PATH%" && "C:\Program Files (x86)\SSHFS-Win\bin\sshfs.exe" -o idmap=user -o StrictHostKeyChecking=no [email protected]: X:"

This first file sshfs.bat is used to start the mount and set up the environment locally. It uses StrictHostKeyChecking=no because I simply couldn't get the Windows environment to point to an existing known_hosts file.

Set oShell = CreateObject ("Wscript.Shell") 
Dim strArgs
strArgs = "cmd /C sshfs.bat"
oShell.Run strArgs, 0, false

This second file sshfs.vbs is a wrapper file and the file to actually call. Its purpose is to keep the command running and also to suppress opening a command window.

Set oShell = CreateObject ("Wscript.Shell") 
Dim strArgs
strArgs = "cmd /C taskkill /im sshfs.exe /f"
oShell.Run strArgs, 0, false

This last file sshfs-kill.vbs kills the running sshfs.exe process, hence unmounts. It's far from perfect, because as it exists now, it's only meant for unmounting a single mount.

With the above scripts handling a single mount is more or less comfortable, if you just create shortcuts to the two .vbs files.

@billziss-gh It would be really great if you could make a little tray app that can mount and unmount visually, like VeraCrypt. I feel like that and an easier installer is what keeps SSHFS-Win from wider adoption, which is unfortunate, because it works really well.

How to trash file unstead of remove it?

Hello!

I've mounted my remote Linux folder in Windows. But I can only remove file from remote folder, not trash. How can I trash file unstead of remove it?

Best regards,
Andrey

Resource temporarily unavailable after inactivity

My setup:

WinFsp-FUSE version 2.8
SSHFS version 2.7
OpenSSH_7.5p1, OpenSSL 1.0.2k  26 Jan 2017
Local Windows 10
Remote Centos 7

My sshfs command line:

sshfs.exe [email protected]:/ Z: -f -orellinks -oreconnect -ouid=-1,gid=-1,create_umask=0007 
    -oVolumePrefix=/sshfs/[email protected] -ovolname=LINUX-10.0.0.10 
    -oFileSystemName=SSHFS -oStrictHostKeyChecking=no -oServerAliveInterval=10

After some inactivity, the Z: drive becomes unavailable, and the console shows this error:

failed to fork: Resource temporarily unavailable
read: Software caused connection abort
      2 [main] sshfs 8440 fork: child -1 - forked process 11836 died unexpectedly, 
      retry 0, exit code 0xC0000142, errno 11

Checking the processes in the task manager, sshfs.exe is still running, but ssh.exe is gone.

Build sshfs

@billziss-gh
I was wondering if you could include some documentation to build sshfs in windows, similar to the passthrough tutorial in winfsp, which is excellent.
Thank you.

System error 67 or "cannot access" when trying to mount \\sshfs\something

I've been using Ubuntu so far, where I used sshfs to mount a remote filesystem. Now, under Windows 7 Pro I've installed SSHFS-Win, and then WinFsp, and I'm trying to mount that same filesystem, but it fails. Using the Map Network Drive interface I try pointing to \\sshfs\[email protected]. It asks for my user and password and immediately after I enter them I get the "cannot access" error.

untitled

Trying the net use way goes like this:

net use \\sshfs\[email protected]:/var/www/mydir
The password is invalid for \\sshfs\[email protected]:/var/www/mydir.

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

The network name cannot be found.

Now I've tried every possible syntax variation I could think of, but to no avail. I've checked the comment in this issue winfsp/winfsp#21 (comment) and mounting \\memfs64\share works for me. On the other hand, I've also tried simply running sshfs [email protected]:/var/www/mydir C:\mydir in the console and after a password prompt the folder gets mounted with no problems.

Could this possibly be an issue with special characters in my password or something? If so, why does one way work and others - not?

I would really appreciate some help with figuring this out.

Installation Instuctions?

Readme file doesn't explain how to actually install SSHFS. It simply starts with once WinFSP and SSHFS are installed use these commands. Maybe I am missing some other instructions somewhere, but I haven't found an installer, or instructions on what to do with the files to compile them, or if they just need to be dropped in place somewhere in the WinFSP folder.

SSHFS -o reconnet not working

The -o reconnect option is not working, it does not survive a short network disconnection.
To reproduce, connect using the command line, then unplug the network for a moment and plug again.
The terminal hangs for some time, and the this error appears:

failed to fork: Resource temporarily unavailable
read: Software caused connection abort
      2 [main] sshfs 8440 fork: child -1 - forked process 11836 died unexpectedly, 
      retry 0, exit code 0xC0000142, errno 11

The ssh.exe process does not start again. I think this issue is the same as #49.

I tried autossh using this command line option: -o ssh_command=autossh -M 0 -vv, but although it keeps the ssh.exe alive and trying to reconnnect, it does not restore the sshfs activity and the drive remains unavailable.

My setup:

WinFsp-FUSE version 2.8
SSHFS version 2.7
OpenSSH_7.5p1, OpenSSL 1.0.2k  26 Jan 2017
Local Windows 10
Remote Centos 7

My sshfs command line:

sshfs.exe [email protected]:/ Z: -f -o reconnect -ouid=-1,gid=-1
    -oVolumePrefix=/sshfs/[email protected] -oStrictHostKeyChecking=no 
    -oServerAliveInterval=10 -oServerAliveCountMax=10000 

umask option not working

When applying the umask option, it doesn't have any effect on the remote machine.

Please keep in mind that the default behavior of umask is to apply executable bits to directories, while not applying them to files. So a default umask of 0022 should lead to permissions of 0755 for directories and 0644 for files.
This is something that so many FUSE implementations get wrong.

Unable to access to the remote's root / directory

Despite what is written in the documentation I don't manage to mount the remote's root / directory using the following format:
\\sshfs\user@host\..\..
No error displayed, just redirected to Network.

With this format \\sshfs\user@host\.. I got an error:

\\sshfs is not accessible. You might not have permission to use this network resource.
The Server service is not started.

I perfectly manage to access \\sshfs\user@host, so is there anything else to do to unblock access to the remote's root / directory?

Question: About version of sshfs

Hello
Is there any particular reason why you are still at version a9a1cc0 (1 Mar 2016) for sshfs?
A lot has changed since may 2016.
Thanks
KB

Quickbooks

Hello, I didnt see this anywhere and am trying to test it out. But do you know if quickbooks files can be opened and run over this mount?

Not working on Windows 10

FYI I tried running this on Windows 10, it asks me for my credentials, which were correct, but then it said there was an error and didn't mount the ssh fs.

Feature request: Simplify mount path \\sshfs\host

It would be nice to simplify the mount path even further, using the logged in user if not specified, so the syntax would end up like this:

net use Z: \\sshfs\host [user]

The current version requires \\sshfs\user@host.

question

In the readme use say to install fuse on cygwin I was wondering how you would do that? is it possible to install fuse in cygwin without winfsp being on the windows system? Just wondering all i really require is fuse so i can use gvfs and sftp on cygwin.

also any help would be appreciated.

gssapi support

It would be nice to use heimdal kerberos gssapi for authentication.

How to safely install sshfs-win as an existing Cygwin user

I've just installed sshfs-win, and I'm very happy with it, so far!
But I noticed that it installs its own copy of several Cygwin binaries, most notably cygwin1.dll. I have my own Cygwin installation, and this may cause major issues – version conflicts, a different root and home directory depending on which copy of the dll gets loaded first, etcetera.

Is there a way to properly install sshfs-win as an existing Cygwin user?

Feature request: Set drive name

The parameter -o volname sets the volume name visible in the drive properties, next to the icon.
The parameter -o FileSystemName is appended to the "FUSE" name in the File System attribute.
However, the drive name is not set.
I am modifying this registry key to set the name:

set REGKEY=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##sshfs#user@host
reg add %REGKEY% /v _LabelFromReg /d DriveName /f

Information: A GUI tool to manage sshfs-win

This bug entry introduces SiriKali[1] to users of sshfs-win as a GUI tool they can use to manage sshfs-win.

Instructions on how to setup sshfs-win connections using SiriKali are found here[2].

SiriKali front page has a link to a window's installer. The installer is not signed though and expect to get a warning from windows saying the application is from an unknown publisher.

[1] https://mhogomchungu.github.io/sirikali/
[2] https://github.com/mhogomchungu/sirikali/wiki/Frequently-Asked-Questions#90-how-do-i-add-options-to-connect-to-an-ssh-server

Cannot climb up directories in windows explorer

For some reason, it seems that it is no possible to climb up folders when writing the address in the windows explorer address bar. For instance:
\\sshfs\username@linux-host!9999
takes to you the user's home directory, as expected, but:
\\sshfs\username@linux-host!9999\..\..
just takes you back to the "Network" place in windows 10, instead of climbing up two folders. Trying to use absolute paths:
\\sshfs\username@linux-host!9999\\media
does not work either, an error message saying that windows could not access that destination.

However, all these commands work if they are used when creating a new network drive.

Files are often empty (zero bytes) when saved

Hi,
I'm using WinFsp + sshfs-win to mount a remote linux system. When I save a file, it often happens that the resulting file is empty. Sometimes the file is unchanged, and sometimes it is saved correctly. It also happens that I sometimes loose rights to save files, and have to kill sshfs and remount. I don't know if all these problems are related, but I'd like to concentrate on the zero bytes issue first since it is the most common problem.

When it occurs, I just save the file again until it works. I have not experienced that the file is corrupted or truncated in the middle, either it is empty or it is saved fully.

When I was using sublime text, I tried toggling "atomic save". Atomic save doesn't save the file directly, but creates a new file and renames it over the old. I read that sshfs can have problems with this, however it was already disabled, and I think enabling it actually decreased the occurrance of the bug, but I'm not sure. I am now using VS code which doesn't seem to have that feature.

I am using Windows 10 Insider build 16237, sshfs-win 2.7, WinFSP 1.0.17072.0. I think it is not related to the insider build as I have had the problem for a while.

The remote server is Scientific Linux (CentOS) 6.9. The only thing that is out of the ordinary is that the remote path is on an AFS filesystem. I never have any issues when using it via ssh or scp.

I currently connect via the following command from cygwin (I had problems with the explorer integration before, so I stuck with this way for now):

/cygdrive/c/Program\ Files\ \(x86\)/SSHFS-Win/bin/sshfs [email protected]:/afs/cern.ch/user/j/jmansour U: -o idmap=user,follow_symlinks -f

When it works, SSHFS is really nice, but this issue is really frustrating (it seems to have "good days" and "bad days"). Any ideas what the problem could be?

x86 binary missing

Hi,

I installed latest winfsp-1.1.17192 and sshfs-win-2.7.17038. Contrary to winfsp, sshfs-win installed a x64 binary in my x86 system. I searched the x86 binary everywhere, where is-it?

Simultaneous upload and download hang

My setup:

SSHFS version 2.7
WinFsp-FUSE version 2.8
OpenSSH_7.5p1, OpenSSL 1.0.2k  26 Jan 2017
Local Windows 7
Remote RHEL 7

Command line:

sshfs.exe user@host:/ X: -f -orellinks -oreconnect
    -ouid=-1,gid=-1,create_umask=0007 -oVolumePrefix=/sshfs/user@host
    -ovolname=user@host -oFileSystemName=SSHFS -oStrictHostKeyChecking=no
    -oServerAliveInterval=10

I have been having a copy hang issue difficult to debug and I though it was random, but at least I think this is the way to reproduce it.
I was able to download (copy from X: drive to C: drive) many large files at the same time (>100GB). Uploading (from C: to X:) is ok too. However, downloading and uploading at the same time, even with relatively small files (around 1GB), windows explorer hangs, the two copy operation freeze, the network activity shows zero progress, and the X: drive becomes unavailable. I have to kill the sshfs process to close the two copy windows.

Request For Comments: add nsswitch.conf

SSHFS-Win was conceived as a simple way to map SSHFS drives through explorer (using the \\sshfs\user@server syntax).

However I am finding that a lot of people want to run SSHFS through the command-line but they often hit the roadblock that the minimal Cygwin environment included with SSHFS does not includes support for home directories.

One simple solution might be to include an /etc/nsswitch.conf file with the following contents:

db_home: windows

This will make the user's Windows home directory (usually C:\Users\USER) into his/her SSHFS-Win home directory and will alleviate some of the discussed problems.

What do you guys think?

Mounting same path with different drive not supported

To mount the same remote path on different drive, it only works mounting from the command line using sshfs with a different VolumePrefix.
The default value in sshfs-win.c is --VolumePrefix=/sshfs/user@host/path.
I changed the path by the drive letter or something random and it worked.
My setup:
Windows 7 x64
WinFsp 2018.2 B1
SSHFS-Win v2.7.17334

Use existing cygwin environment

I use the cygwin environment to connect to ssh servers and I'd like to use that same environment for sshfs, given that most of my ssh configs (keys loaded to in ssh-agent, known_hosts, ssh_config) live there. Would it be possible to compile the project for an existing cygwin environment and mount the shares from there calling sshfs directly?

Can't mount as root user, but other users work

I have two Ubuntu servers, one with 14.04, the other with 16.04, both with sshd enabled for root user. I'm trying to mount them as network drives, but I can only connect when I use a non-root user.

For example:

\\sshfs\[email protected] does work
\\sshfs\[email protected] does not work

Same thing on both servers. I am able to use sftp as root without issue to them. Anything I should try?

sshfs-win hangs forever when asked to connect to a remote system for the first time without using "StrictHostKeyChecking=no" option

Steps i took to reproduce:

  1. I started by having an empty "known_host" file located at "C:\Program Files (x86)\SSHFS-Win\home<user>.ssh"

  2. Attempted to create to a remove system with command:

C:\Program Files (x86)\SSHFS-Win\bin>sshfs.exe -f [email protected]:/home/ink Z:  -o rw,fsname=sshfs@"[email protected]:/home/ink",subtype=sshfs,idmap=user,password_stdin
<Entered password>

and sshfs hanged forever and the host file was not updated.

  1. Running below command worked and the host file was silently updated(notive the addition of StrictHostKeyChecking=no option)
C:\Program Files (x86)\SSHFS-Win\bin>sshfs.exe -f [email protected]:/home/ink Z:  -o rw,fsname=sshfs@"[email protected]:/home/ink",subtype=sshfs,idmap=user,password_stdin,StrictHostKeyChecking=no
<Entered password>
The service sshfs has been started.
The service sshfs has been stopped.

The command at step two now works as expected since the host_file is properly updated.

\\sshfs\<USER_NAME>@<DOMAIN>!<PORT>\ does not work

Connecting to a different port will continuously prompt for passwords.
systeminfo

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.14393 N/A Build 14393

Network Card(s):           3 NIC(s) Installed.
                           [01]: Realtek PCIe GBE Family Controller
                                 Connection Name: Ethernet
                                 DHCP Enabled:    Yes
                                 DHCP Server:     N/A
                                 IP address(es)
                           [02]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (vlan)
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 192.168.0.222
                                 [02]: fe80::aca2:c28e:2000:f1a9
                           [03]: Hyper-V Virtual Ethernet Adapter
                                 Connection Name: vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)

Random deletion of new files; how to test with mount options?

I'm having seemingly random auto-deletion of newly created files on a mapped drive.
Copying files with windows explorer always works. Also creating new files.
But when saving new files to the mapped drive from a variety of programs, they seem to auto-delete at random. When a autodelete happens, it happens in under 10s for up to 10MB files (that I've seen so far).

The linux server inotifywait usually shows two delete commands for the file in question. This makes me think it might have something to do with windows caching, or file renaming or something.

I want to try to mount with the sshfs_sync option to see if that has any effect. But I can't find instructions on how to pass mount options via the windows explorer "map network drive" box.
Is there a way to do this, or some other possibilities?

Mounting an Ubuntu FS onto a Windows Host - Access Denied

I'm attempting to mount my Ubuntu system on to my Windows 10 machine.
I have installed WinFSP and SSHFS-Win
I have my authorized_keys set up on my remote machine with my public/private key combo and my .ssh/config is set up (I realize that this option still doesn't work - judging from the open issues list)
I'm attempting to mount the file system using the form:

net use v: \sshfs\domain+localuser=[email protected]

I am prompted for my user/password for 'sshfs' - which I enter interactively.

The share is mounted correctly and I can read/browse -- but I cannot write to it.
"Access is denied"

Any suggestions?
(I really want this to work - this would cut hours per week off my work pipeline)

.ssh/config does not appear to be used

I have a config file at C:\Users\me\.ssh\config, which is used successfully by the ssh shipped with git.

It contains something basic like

Host myhost
    User myuser
    HostName mydomain.com

However, mapping \\sshfs\myhost does not work.

A possible hint comes from running the following:

> "C:\Program Files (x86)\SSHFS-Win\bin\ssh.exe" somedomain.com
Could not create directory '/home/me/.ssh'.

Is the issue here that the windows home and the cygwin home are distinct?

Thanks again for otherwise very helpful software!

Chocolatey package

I was delighted to see the prominent "choco install winfsp" button on the WinFsp page. Straight to the point! Is there any chance of getting a Chocolatey package also for SSHFS-Win? It would be so convenient.

Inconsistent location of the registry values between 32 bit and 64 bit installers

sshfs-win-2.7.17334-x86.msi installer creates the registry key at "SOFTWARE\WOW6432Node\SSHFS-Win" but sshfs-win-2.7.17334-x64.msi installers creates the registry key at ""SOFTWARE\SSHFS-Win" , why the inconsistency?

Because of this, SiriKali fails[1] to find sshfs if its installed using 64 bit installer and i just found out about this now. It took me a while to figure out why things fail now since i was certain things works last time i used sshfs with SiriKali.

[1] https://github.com/mhogomchungu/sirikali/blob/5019cf70fd8a086062cb153a922197e908e4011c/src/winfsp.cpp#L174

Password-less logins not working, even though they appear to connect successfully

I use private keys instead of passwords to login to my servers. Checking the documentation I could find on sshfs-win, there seems to be no mention of supporting this, however, since I saw the standard ssh.exe and sshfs.exe are bundled, I fired up Process Monitor to see if at any time it tries to read the private keys.

I found that it was trying to access C:\Program Files (x86)\SSHFS-Win\home\SYSTEM\.ssh\id_rsa, so I quickly created a home\SYSTEM directory and copied the appropriate files from my Cygwin installation.

After retrying, I found that it successfully read the private keys, so no privilege issues, however, shortly the Windows error message popped up, informing me that Windows cannot access \\sshfs\[email protected].

Checking the logs on my server confirms that it was able to connect:

Jul 30 23:01:54 excelsior.rolisoft.net sshd[13532]: Accepted publickey for root from 2a02:2f07:d27c:600:bd86:1e62:fde5:9596 port 30453 ssh2: RSA SHA256:bCkuJouJFMZknUVoW8oCAI/WP/f3dTEaGSWOjCFjE2g
Jul 30 23:01:54 excelsior.rolisoft.net sshd[13532]: pam_unix(sshd:session): session opened for user root by (uid=0)

Running ssh.exe [email protected] from C:\Program Files (x86)\SSHFS-Win\bin as nt authority\system also drops me into a shell, without any password prompts, so it should work.

Going through the whole list of spawned processes during a connect does reveal at least one instance of sshfs.exe exiting with status code 1, however, I'm all out of ideas on how to debug this, as the SSH client has no option to log to a file as far as I know.

SSH compression

Hello Bill
Just a question:
Can we enable SSH compression or maybe it's already enabled by default.
Thanks
Kb

It seems that the sshfs-win is broken with the latest release of WinFsp

Due to that I'm not anymore is able to remote SSH mount with \sshfs... on Windows 10 Pro - x64 - 1709 - 16299.431:

choco info winfsp
Chocolatey v0.10.11
winfsp 1.3.18160 [Approved]
 Title: WinFsp | Published: 09/06/2018
 Package approved as a trusted package on Jun 09 2018 23.31.11.
 Package testing status: Passing on Jun 09 2018 23.08.56.
 Number of Downloads: 3632 | Downloads for this version: 54
 Package url
 Chocolatey Package Source: https://github.com/billziss-gh/winfsp/tree/master/build/choco
 Package Checksum: '3V0MED+2B/gdw/bJohkmQPuOO+XfQJvfkdf+guI3N3g4xAjv938q5VUsN7llAQdsGVuNyijmjXllFSvDaR6UPw==' (SHA512)
 Tags: driver filesystem fuse gplv3 windows-kernel admin
 Software Site: https://github.com/billziss-gh/winfsp
 Software License: https://github.com/billziss-gh/winfsp/blob/master/License.txt
 Software Source: https://github.com/billziss-gh/winfsp
 Documentation: https://github.com/billziss-gh/winfsp/tree/master/doc
 Mailing List: https://groups.google.com/forum/#!forum/winfsp
 Issues: https://github.com/billziss-gh/winfsp/issues
 Summary: Windows File System Proxy - FUSE for Windows
 Description: WinFsp is a set of software components for Windows computers that allows the creation of user mode file systems. In this sense it is similar to FUSE (Filesystem in Userspace), which provides the same functionality on UNIX-like computers.

  Some of the benefits of using WinFsp are listed below:

  * Very well-tested and stable.
  * Very fast.
  * Strives for compatibility with NTFS.
  * Easy to understand but comprehensive API.
  * FUSE compatibility layer for native Windows and Cygwin.
  * Signed drivers provided on every release.
  * Available under the GPLv3 license with a special exception for Free/Libre and Open Source Software.

  To verify installation:

  * For 64-bit Windows: `net use m: \\memfs64\share` from the command prompt.
  * For 32-bit Windows: `net use m: \\memfs32\share`
  * For Cygwin: `net use m: '\\memfs64\share'`
  * To delete the drive: `net use m: /delete`
 Release Notes: https://github.com/billziss-gh/winfsp/blob/master/Changelog.asciidoc

1 packages found.

Thank you.

terribly slow when doing dir listings using /bin/ls in cygwin

Probably not really an sshfs bug but a cygwin problem.

I am actually disabling all -l options and colors. Still takes quite a long time.

It is really strange. Native windows dir is expectedly (by far!?) the fastest.

However, while normal ls on cygwin via smb is faster, a ls -l performs faster when run via sshfs then via smb (cygwin opens the files here).

I simply don't get it why cygwin ls is so inferior (4x) on sshfs for normal cygwin readdir calls. The problem is that this makes anything (tab completion, etc.) slow.

> sshfs.exe -ofstypename=SSHFS -o idmap=user -o umask=000  -o [email protected] -o Compression=no user@smbsrv: x:

>time \ls  /mnt/x/bin >/dev/null

real    0m6.103s
user    0m0.000s
sys     0m0.031s


>time \ls  //smbsrv/bin >/dev/null

real    0m1.794s
user    0m0.015s
sys     0m0.046s

>time \ls -l //teco141pc/riedel/bin >/dev/null

real    0m32.162s
user    0m0.000s
sys     0m0.108s

>time \ls -l /mnt/x/bin >/dev/null

real    0m28.309s
user    0m0.046s
sys     0m0.093s

>time cmd /c dir x:\bin >/dev/null

real    0m0.789s
user    0m0.000s
sys     0m0.000s

>time cmd /c dir '\\smb\bin'  >/dev/null

real    0m0.576s
user    0m0.000s
sys     0m0.015s

Any ideas how to speed things up?

Symlinks do not work

I think this is simply a case of -o follow_symlinks not being provided as an argument to sshfs. Would it be sane to pass this by default within the net use handler?

I guess a bigger question would be how to actually pass extra arguments to sshfs via net use.

mounting via net use broken in Windows10 build1803

After the upgrade to build 1803 my usual command in the form
net use S: \\sshfs\[email protected]!22 *
resulted in:

System Error 53 Has Occurred.
The network path was not found.

Since then I am mounting via this cmd script:

taskkill /F /IM "sshfs.exe"
cd "C:\Program Files (x86)\SSHFS-Win\bin"
set CYGFUSE=WinFsp
set "PATH=C:\Program Files (x86)\SSHFS-Win\bin;%%PATH%%"
sshfs [email protected]: S: -oidmap=user -oPort=22 -orellinks -ofstypname=SSHFS --VolumePrefix="\sshfs\[email protected]" -ofollow_symlinks

This workaround has also problem in default Windows config with separate management of network drives for normal and elevated processes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.