Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Kind of related, but what I'd love is a way to share part of my local file system with the remote host without using FUSE or requiring root access on the remote system. Something like:

    local $ echo world > ~/src/hello
    local $ sharewith-ssh --dir ~/src:/src code.example.com
    Last login: Wed Aug 16 09:33:55 2022 from 1.2.3.4
    code ~ $ cd /src
    code /src $ cat hello
    world
    code /src $
I think it could be built with a local agent, a binary that you download on the remote host to intercept file system calls for a path (run it and it execs your shell with LD_PRELOAD to the library), and then forwards file system and I/O requests back to the the agent over SSH to get at those files. You could even have a permission prompt UI on the local agent to permit/deny individual reads/writes.

Does anything like this exist?



What's the problem with FUSE?

Anyway, it needs a daemon on the remote system, but perhaps https://github.com/u-root/cpu is suitable. (I can't vouch for it, not having used it.)

The HTCondor batch system also provides something like that, but I don't know details, and it's probably not a separable component.


vscode connected with ssh is close: It's not sharing because it only allows you to edit the server file system as if you had opened a project locally, but it does give you the feeling that you have the project there, and every time you save it goes directly to the server via ssh.


Emacs TRAMP mode can do that too; it supports SSH, sudo (to edit as a different user), and I think a bunch of other protocols. It also supports multi-hop, e.g. edit as sudo, on a remote server, connected via an intermediate bastion/proxy machine.

TRAMP works fine with shell-mode, version control (e.g. magit), dired (file browser), etc. too :)

https://www.emacswiki.org/emacs/TrampMode


> intercept file system calls for a path

How is that any different than FUSE?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: