You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Jun 17, 2019, 8:15 AM, at 8:15 AM, Vladimir Varlamov ***@***.***> wrote:
What version of sshfs-win do you use?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#95 (comment)
PS C:\Program Files\SSHFS-Win\bin> .\sshfs.exe --version
SSHFS version 3.5.2
FUSE library version 3.2
Btw I also get System error 67 has occurred if I try to use the net use X: \\sshfs\pi@192.168.8.108\. If I type in the explorer address bar I get some error too.
Something is badly broken.
P.S. SSH and SFTP works, I've tried with ssh.exe provided by Windows 10 and with WinSCP:
Reacted by Mathew McBride, Yuanxun LI, Igor Ovsyannikov, dbadrian, adizhol, Christ-Jan Wijtmans, Lukas Schreiner, Dmitry, Tomomas, Alexandra G. Roberts and 1 more
I think i figured out what might be the issue here.
If you have windows ssh support installed it might interfere perhaps. PS C:\program files\sshfs-win\bin> ssh -V OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 PS C:\program files\sshfs-win\bin> .\ssh.exe -V OpenSSH_7.9p1, OpenSSL 1.0.2r 26 Feb 2019
SSHFS might not be calling the correct ssh program?
Reacted by Steely Wing, Emad Ha, Justin, bersbersbers, Dmitry, Mihaly Meszaros, Benjamin Mayrargue, wowlikon and Alexandra G. Roberts
I had this very same issue - for whatever reason it doesn't matter if you have the path set in the environment variable or not, the path NEEDS to be set inside the command prompt before running the command. For me, running just
sshfs.exe -f user@host: z:
gives me
read: Connection reset by peer
but running
set PATH=C:\Program Files\SSHFS-Win\bin
sshfs.exe -f user@host: z:
allows me to connect successfully
Reacted by Dennie Reniers, Cabji, Dmitry, kwikwag, peterengstrom3, Lunjio, Fidel Perez-Smith, Snehashis Roy, Praveen Iyyappan Valsala, sliftist and 3 more
And by the way: a very easy typo (forgetting the final colon on user@host:) can lead to essentially the same error message ("Connection reset by peer"), as you can see:
I had this very same issue - for whatever reason it doesn't matter if you have the path set in the environment variable or not, the path NEEDS to be set inside the command prompt before running the command.
This is not strictly correct. In fact, by issuing
set PATH=C:\Program Files\SSHFS-Win\bin
you are doing much more than adding C:\Program Files\SSHFS-Win\bin to PATH - you are effectively removing everything else from PATH by overwriting it. In effect, as soon as you do this, commands such as net use will fail.
As @dorkbox has commented, adding C:\Program Files\SSHFS-Win\bin before the Windows SSH bin directory works, both within and outside of that command prompt. That is basically
set PATH=C:\Program Files\SSHFS-Win\bin;%PATH%
But that is only a workaround, as you probably do not want to use SSHFS' ssh.exe system-wide. (There is a reason you had ssh.exe installed before, right?) So let's look at the real problem, which is that
C:\Program Files\SSHFS-Win\bin>.\sshfs.exe ...
should prefer an ssh.exe in the current directory over an ssh.exe somewhere else. The reason why it doesn't is that sshfs.exe sets its own working directory, internally - probably here:
Should sshfs-win.c always pass the option -o ssh_command=bin/ssh.exe (or perhaps -o ssh_command=/usr/bin/ssh.exe to avoid the problem of picking the wrong ssh.exe that some experience?
Should sshfs-win.c always pass the option -o ssh_command=bin/ssh.exe [...] to avoid the problem of picking the wrong ssh.exe that some experience?
Having thought about this for half a day, I would say yes. In light of this issue and its duplicates (#39, #74 and maybe more), there are a lot of related issues that would be solved. In addition, in my testing on my system, I have not found any other ssh.exe that works, except the one that your installer provides [no idea why - I'd love to use the Windows OpenSSH one because I could get rid of PuTTY's agent altogether] - so there won't be a lot of working setups that you would break this way.
Finally, users should still be able to pass another -o ssh_command=some_other_ssh.exe - and if I understand sshfs-win.c correctly, this will be appended after your internal -o ssh_command=bin/ssh.exe, so sshfs.exe should be able to ignore the former and retain only the latter (this needs to be tested). The only thing that would not be perfect is that in debug mode, when passing -o ssh_command=some_other_ssh.exe, one would see two-o ssh_command=..., but I really don't think that's a problem.
The alternative would be to reorganize the file structure of the installer to place ssh.exe not in bin, but one folder up where sshfs.exe would pick it up without bin/ - but I do not like that solution a lot.
SSHFS-Win now passes the -o ssh_command=/usr/bin/ssh.exe to SSHFS, which should ensure that the right SSH always gets used regardless of PATH. Hopefully this will resolve this and similar issues.
Reacted by Jari Pennanen, bersbersbers, Dmitry and Ajasja Ljubetič
SSHFS-Win now passes the -o ssh_command=/usr/bin/ssh.exe to SSHFS, which should ensure that the right SSH always gets used regardless of PATH. Hopefully this will resolve this and similar issues.
It did not work for me.
using -ossh_command=bin/ssh.exe did work.
I had this very same issue - for whatever reason it doesn't matter if you have the path set in the environment variable or not, the path NEEDS to be set inside the command prompt before running the command.
This is not strictly correct. In fact, by issuing
set PATH=C:\Program Files\SSHFS-Win\bin
you are doing much more than adding C:\Program Files\SSHFS-Win\bin to PATH - you are effectively removing everything else from PATH by overwriting it. In effect, as soon as you do this, commands such as net use will fail.
As @dorkbox has commented, adding C:\Program Files\SSHFS-Win\bin before the Windows SSH bin directory works, both within and outside of that command prompt. That is basically
set PATH=C:\Program Files\SSHFS-Win\bin;%PATH%
But that is only a workaround, as you probably do not want to use SSHFS' ssh.exe system-wide. (There is a reason you had ssh.exe installed before, right?) So let's look at the real problem, which is that
C:\Program Files\SSHFS-Win\bin>.\sshfs.exe ...
should prefer an ssh.exe in the current directory over an ssh.exe somewhere else. The reason why it doesn't is that sshfs.exe sets its own working directory, internally - probably here:
Please try the latest release: SSHFS-Win 2021.1 Beta.
SSHFS-Win now passes the -o ssh_command=/usr/bin/ssh.exe to SSHFS, which should ensure that the right SSH always gets used regardless of PATH. Hopefully this will resolve this and similar issues.
It did not work for me. using -ossh_command=bin/ssh.exe did work.
SSHFS version 3.5.2
FUSE library version 3.2
I have tried the beta release, but it did not do anything for me, like @softlion says. If I add the "-o ssh_command=bin/ssh.exe" it seems to get permanently stuck.
I had this very same issue - for whatever reason it doesn't matter if you have the path set in the environment variable or not, the path NEEDS to be set inside the command prompt before running the command. For me, running just
sshfs.exe -f user@host: z:
gives me
read: Connection reset by peer
but running
set PATH=C:\Program Files\SSHFS-Win\bin
sshfs.exe -f user@host: z:
allows me to connect successfully
@cjwijtmans wrote "...SSHFS might not be calling the correct ssh program?
So the reason setting the path works is that by doing so, you removed the problematic version of ssh from the path. Thank you, that works for me too.
I get "read: Connection reset by peer" either by using set PATH=C:\Program Files\SSHFS-Win\bin or by running .\sshfs.exe -o ssh_command=.\ssh.exe while inside the SSHFS-Win\bin directory.
On Sat, Feb 15, 2025 at 02:57:20AM -0800, shrx wrote:
I get "read: Connection reset by peer" either by using `set PATH=C:\Program Files\SSHFS-Win\bin` or by running `.\sshfs.exe -o ssh_command=.\ssh.exe` while inside the SSHFS-Win\bin directory.
SSHFS version 3.5.2
FUSE library version 3.2
Hello
While in C:\Program Files\SSHFS-Win\bin, try running
.\sshfs.exe -o ssh_command=".\ssh.exe -vvv"
Activity
bes-internal commentedon Jun 17, 2019
What version of sshfs-win do you use?
TheREK3R commentedon Jun 17, 2019
TheREK3R commentedon Jun 27, 2019
any ideas, should i be using a certain set of options?
Ciantic commentedon Jul 17, 2019
I'm getting this problem as well, however I downloaded latest beta for both:
Version is the latest
Btw I also get System error 67 has occurred if I try to use the
net use X: \\sshfs\pi@192.168.8.108\. If I type in the explorer address bar I get some error too.Something is badly broken.
P.S. SSH and SFTP works, I've tried with ssh.exe provided by Windows 10 and with WinSCP:
cjwijtmans commentedon Nov 8, 2019
I think i figured out what might be the issue here.
If you have windows ssh support installed it might interfere perhaps.
PS C:\program files\sshfs-win\bin> ssh -V OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5PS C:\program files\sshfs-win\bin> .\ssh.exe -V OpenSSH_7.9p1, OpenSSL 1.0.2r 26 Feb 2019SSHFS might not be calling the correct ssh program?
Ice-IX commentedon Dec 16, 2019
I had this very same issue - for whatever reason it doesn't matter if you have the path set in the environment variable or not, the path NEEDS to be set inside the command prompt before running the command. For me, running just
gives me
but running
allows me to connect successfully
dorkbox commentedon Apr 7, 2020
If you change the environment variables in windows to move SSHFS\bin ABOVE the windows SSH bin directory, it works.
bersbersbers commentedon Jun 30, 2020
And by the way: a very easy typo (forgetting the final colon on
user@host:) can lead to essentially the same error message ("Connection reset by peer"), as you can see:(connects to the correct host, at least)
(tried to connect to X)
bersbersbers commentedon Jul 1, 2020
This is not strictly correct. In fact, by issuing
you are doing much more than adding
C:\Program Files\SSHFS-Win\bintoPATH- you are effectively removing everything else fromPATHby overwriting it. In effect, as soon as you do this, commands such asnet usewill fail.As @dorkbox has commented, adding
C:\Program Files\SSHFS-Win\binbefore the Windows SSH bin directory works, both within and outside of that command prompt. That is basicallyBut that is only a workaround, as you probably do not want to use SSHFS'
ssh.exesystem-wide. (There is a reason you hadssh.exeinstalled before, right?) So let's look at the real problem, which is thatshould prefer an
ssh.exein the current directory over anssh.exesomewhere else. The reason why it doesn't is thatsshfs.exesets its own working directory, internally - probably here:https://github.com/libfuse/sshfs/blob/8340a67b31112a32469cca0e0a94f965d4200021/sshfs.c#L1191
So my proposed fix, without any
PATHtinkering even with OpenSSH in thePATH, and without changing working directories, is this:cjwijtmans commentedon Aug 10, 2020
duplicate issue
#74
billziss-gh commentedon Jan 7, 2021
@bersbersbers
Should
sshfs-win.calways pass the option-o ssh_command=bin/ssh.exe(or perhaps-o ssh_command=/usr/bin/ssh.exeto avoid the problem of picking the wrongssh.exethat some experience?bersbersbers commentedon Jan 8, 2021
@billziss-gh
Having thought about this for half a day, I would say yes. In light of this issue and its duplicates (#39, #74 and maybe more), there are a lot of related issues that would be solved. In addition, in my testing on my system, I have not found any other
ssh.exethat works, except the one that your installer provides [no idea why - I'd love to use the Windows OpenSSH one because I could get rid of PuTTY's agent altogether] - so there won't be a lot of working setups that you would break this way.Finally, users should still be able to pass another
-o ssh_command=some_other_ssh.exe- and if I understandsshfs-win.ccorrectly, this will be appended after your internal-o ssh_command=bin/ssh.exe, sosshfs.exeshould be able to ignore the former and retain only the latter (this needs to be tested). The only thing that would not be perfect is that in debug mode, when passing-o ssh_command=some_other_ssh.exe, one would see two-o ssh_command=..., but I really don't think that's a problem.The alternative would be to reorganize the file structure of the installer to place
ssh.exenot inbin, but one folder up wheresshfs.exewould pick it up withoutbin/- but I do not like that solution a lot.Both are working for me. I cannot really say why, as I have only a very basic idea how Cygwin paths work. I thought the issue may be related to this, but maybe it's not:
https://github.com/libfuse/sshfs/blob/8340a67b31112a32469cca0e0a94f965d4200021/sshfs.c#L1191
(This
chdirhowever does explain why-o ssh_command=/bin/ssh.exealso works.)Sorry I'm cannot be more helpful here.
shyjuk commentedon Jan 11, 2021
Worked ! Thanks ..
set PATH=C:\Program Files\SSHFS-Win\bin
sshfs root@192.168.56.11:/ Z: &
Adding & exit to command prompt again.
billziss-gh commentedon Jan 12, 2021
Please try the latest release: SSHFS-Win 2021.1 Beta.
SSHFS-Win now passes the
-o ssh_command=/usr/bin/ssh.exeto SSHFS, which should ensure that the right SSH always gets used regardless ofPATH. Hopefully this will resolve this and similar issues.softlion commentedon Jul 20, 2023
It did not work for me.
using
-ossh_command=bin/ssh.exedid work.sieempi commentedon Dec 14, 2023
The issue was solved for me after deleting c:\Users[user].ssh\config (maybe an incompatibility with other installed versions of ssh)
SonoCseos commentedon Mar 27, 2024
I have tried this solution (and also the other with "set PATH=..."). In both cases, the command remains permanently stuck, no debug message appears.
SonoCseos commentedon Mar 28, 2024
I have tried the beta release, but it did not do anything for me, like @softlion says. If I add the "-o ssh_command=bin/ssh.exe" it seems to get permanently stuck.
manu0401 commentedon Nov 1, 2024
This issue is a duplicate of #74 where I posted some good news in #74 (comment)
kenseehart commentedon Nov 19, 2024
@cjwijtmans wrote "...SSHFS might not be calling the correct ssh program?
So the reason setting the path works is that by doing so, you removed the problematic version of ssh from the path. Thank you, that works for me too.
shrx commentedon Feb 15, 2025
I get "read: Connection reset by peer" either by using
set PATH=C:\Program Files\SSHFS-Win\binor by running.\sshfs.exe -o ssh_command=.\ssh.exewhile inside the SSHFS-Win\bin directory.SSHFS version 3.5.2
FUSE library version 3.2
edit:
net useworks.manu0401 commentedon Feb 15, 2025
shrx commentedon Feb 17, 2025
.\sshfs.exe -o ssh_command=".\ssh.exe -vvv" pi@192.168.1.113: P:
read: Connection reset by peer
shrx commentedon Feb 17, 2025
Solved with
$env:Path = 'C:\Program Files\SSHFS-Win\bin;' + $env:PathDaviidMM commentedon Oct 30, 2025
This did the trick for me 🎊!