GithubHelp home page GithubHelp logo

Comments (12)

billziss-gh avatar billziss-gh commented on June 2, 2024

Interesting Sshfs-win.c sets the path to /bin, so I would not have expected any issues.

I am not sure about this, but I believe that sshfs hardcodes the ssh name, so it might not be possible to rename it (except perhaps with a patch).

I think the correct solution is to find out why sshfs may pick up the wrong ssh at times.

from sshfs-win.

billziss-gh avatar billziss-gh commented on June 2, 2024

https://github.com/billziss-gh/sshfs-win/blob/master/sshfs-win.c#L33

from sshfs-win.

4O4 avatar 4O4 commented on June 2, 2024

@mhogomchungu @billziss-gh SiriKali is using sshfs.exe directly and not through the sshfs-win.exe proxy which actually sets the env

from sshfs-win.

mhogomchungu avatar mhogomchungu commented on June 2, 2024

Which one of the two is SiriKali supposed to be using?

from sshfs-win.

billziss-gh avatar billziss-gh commented on June 2, 2024

Sshfs-win.c is a simple wrapper that is used to support the Windows \\sshfs\... syntax. I think SiriKali can use sshfs.exe directly (so that it also has access to its various options), but with some care in setting up the PATH, etc.

from sshfs-win.

4O4 avatar 4O4 commented on June 2, 2024

Sshfs-win.c is a simple wrapper that is used to support the Windows \sshfs... syntax.

Sorry for an off-topic question, but I'm getting more and more curious about all these projects surrounding sshfs for windows. Where exactly is this magic responsible for \\sshfs syntax implemented? Here or somewhere in WinFSP or elsewhere?

from sshfs-win.

billziss-gh avatar billziss-gh commented on June 2, 2024

The \\sshfs ("UNC syntax") support is provided by WinFsp.

EDIT: If you want the full story read this: WinFsp Service Architecture

from sshfs-win.

4O4 avatar 4O4 commented on June 2, 2024

Thanks! I'm gonna dig into it. I really like your projects, amazing job on the detailed documentation 👍

from sshfs-win.

billziss-gh avatar billziss-gh commented on June 2, 2024

Thanks :)

from sshfs-win.

4O4 avatar 4O4 commented on June 2, 2024

There's another occurence of this problem, but it's now cygwin's fault instead. See: #37 (comment)

While renaming internal ssh.exe might solve the issue, I don't think it is a good idea. I think it's better to keep these executables as close to original as possible to avoid any confusion. Maybe move it to some isolated subdirectory instead?

It would also be nice to make a proper public CLI wrappers. For example: there could be a new sshfs.exe proxy whose only job would be to init the env and then redirect all command line args straight to the original sshfs.exe (which should be isolated and not in PATH so it can't be accidentally called). All WinFsp-related customizations and hardcoded options could be extracted from sshfs-win to sshfs-fsp / sshfs-winfsp and sshfs-win.exe itself should be removed. In my opinion it would provide the best user experience no matter if one prefers mounting drives directly via CLI or mapping them with Explorer. What do you think?

PS I'm volunteering to help and work on this of course

from sshfs-win.

billziss-gh avatar billziss-gh commented on June 2, 2024

The primary purpose of sshfs-win.c is to facilitate running sshfs through the WinFsp Launcher. Not everything that it does applies to command-line usage.

The Launcher is a Windows service and it runs in the context of the SYSTEM account (by default). So when it launches sshfs-win it does so in the SYSTEM context. But running sshfs in the SYSTEM context without the proper options is not very useful, because it gives file access to the SYSTEM account, but not to the user account that started the file system.

So sshfs-win.c determines the user account that actually started the file system and runs sshfs with the appropriate uid, gid options.

Of course, sshfs-win.c does some other things as well, like setting up the environment and default command-line parameters. For example, sshfs-win.c passes the special option -opassword_stdout, which instructs sshfs to respond OK when authentication succeeds. This is to support password-based authentication via the Explorer, etc.

Having said that I can see the usefulness of an sshfs proxy that could be used both from the WinFsp Launcher and the command line. What would the command line interface for such a utility look like in your opinion?

from sshfs-win.

4O4 avatar 4O4 commented on June 2, 2024

When I find some spare time I will make a few experiments based on the ideas from my previous comments and the insights you have provided. If there's anything useful born in the process then I think it's gonna be the best if I come back with an initial PR and we'll continue from there :)

from sshfs-win.

Related Issues (20)

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.