-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sshfs-win cmd vs sshfs #184
Comments
SSHFS-Win is only supposed to work with the SSH that ships with it.
There is a version of OpenSSH that ships with many Windows 10 systems. It is likely that your PATH picks up that SSH instead of the one that ships with SSHFS-Win. Since it seems that you are looking for advanced scenarios which SSHFS-Win does not support by default, I recommend building SSHFS under Cygwin on your own and experimenting from there. All the necessary patches to make SSHFS run on Cygwin/Windows have been upstreamed to to libfuse/sshfs. You will also need WinFsp with "FUSE for Cygwin" installed. |
Ah, I missed that. You are 100% right on why
Doesn't work. Without setting the PATH (as you do for me with
It does not appear to be ignore, as the right ssh is being called.
Ah! That too is a path problem! (I was in "password-less mode", do it didn't dawn on me it wasn't finding wsl, which is the problem.)
Does indeed work flawlessly!!! I admit, using wsl ssh is an advanced use case, but its exciting to know that works!
|
I would not mind a PR, but the biggest problem is that right now I am over-worked with multiple projects so that I would not have time to independently verify and understand why it works. For example, I find it very surprising that SSHFS:
BTW, is that WSL1 or WSL2 SSH? (I expect WSL1). So send a README PR but please be ready to answer questions about it in this issue list, because I will be @'ing you a lot if others fail to replicate your results :)
I have never investigated the full reasons. My reasoning is that the way I package SSHFS-Win it is supposed to use the shipped SSH; any other scenarios are unsupported. A brief look in the SSHFS code finds that it uses a UNIX domain socket, which are not supported in native Windows. And then I find this article, which may explain why this works on WSL. But do not ask me how the Cygwin implementation of a UNIX domain socket can interoperate with the one used in WSL. |
I wouldn't dare ask you why the WSL one works! Thanks for the explanation, I'll look into it some... I am using WSL 1 primarily because microsoft/WSL#4246 Prevents me from using WSL 2 for real work. I was surprised to hear sshfs uses a Unix domain socket... I just naively assumed everything was stdin/stdout. Then again I never care much to learn HOW stfp works. I too am totally shocked! (I will attempt a local WSL2 just to share with you my findings (and before any PRs, just so I can make sure they are as clear as possible). Thanks for the reading material! |
I too find this stuff interesting, but unfortunately these days I have a lot of private work and little time to progress my investigations on WSL1, etc. BTW, I am hoping that once my workload subsides and get some free time I will be able to finally finish FUSE for WSL1: https://github.com/billziss-gh/winfuse That would let us run native Linux sshfs on Windows... |
Sometimes I have to use
sshfs-win cmd
, and other times I have to usesshfs.exe
directly. What is the cause of the discrepancy?Version info
SSHFS version 3.5.2
FUSE library version 3.2
WINFSP 1.6
Windows 10 Pro: 10.0.19041
Works
sshfs-win cmd {username}@{computername}:/home/{username}/bin x:
sshfs andy@viola:/tmp X: -o ssh_command="wsl ssh"
Does not work
sshfs {username}@{computername}:/home/{username}/bin x:
read: Connection reset by peer
After entering my password, whether using password or keyboard interactive authenticationsshfs-win cmd andy@viola:/tmp X: -o ssh_command="wsl ssh"
read: Connection reset by peer
, even if I'm using a shared connection, that has no password needed!Additional information
~/.ssh/config
files:The text was updated successfully, but these errors were encountered: