base on A network filesystem client to connect to SSH servers # SSHFS ## About SSHFS allows you to mount a remote filesystem using SFTP. Most SSH servers support and enable this SFTP access by default, so SSHFS is very simple to use - there's nothing to do on the server-side. ## Development Status SSHFS is shipped by all major Linux distributions and has been in production use across a wide range of systems for many years. However, at present SSHFS does not have any active, regular contributors, and there are a number of known issues (see the [bugtracker](https://github.com/libfuse/sshfs/issues)). The current maintainer continues to apply pull requests and makes regular releases, but unfortunately has no capacity to do any development beyond addressing high-impact issues. When reporting bugs, please understand that unless you are including a pull request or are reporting a critical issue, you will probably not get a response. ## How to use Once sshfs is installed (see next section) running it is very simple: ``` sshfs [user@]hostname:[directory] mountpoint ``` It is recommended to run SSHFS as regular user (not as root). For this to work the mountpoint must be owned by the user. If username is omitted SSHFS will use the local username. If the directory is omitted, SSHFS will mount the (remote) home directory. If you need to enter a password sshfs will ask for it (actually it just runs ssh which asks for the password if needed). Also many ssh options can be specified (see the manual pages for *sftp(1)* and *ssh_config(5)*), including the remote port number (`-oport=PORT`) To unmount the filesystem: ``` fusermount -u mountpoint ``` On BSD and macOS, to unmount the filesystem: ``` umount mountpoint ``` ### Bypassing SSH #### Using directport Using direct connections to sftp-server to bypass SSH for performance is also possible. To do this, start a network service using sftp-server (part of OpenSSH) on a server, then connect directly using `-o directport=PORT` option. On server (listen on port 1234 using socat): `socat tcp-listen:1234,reuseaddr,fork exec:/usr/lib/openssh/sftp-server` On client: `sshfs -o directport=1234 127.0.0.1:/tmp /tmp/mnt` Note that this is insecure as connection will happen without encryption. Only use this on localhost or trusted networks. This option is sometimes used by other projects to mount folders inside VMs. IPv6 is also possible: `socat tcp6-listen:1234,reuseaddr,fork exec:/usr/lib/openssh/sftp-server` `sshfs -o directport=1234 [::1]:/tmp /tmp/mnt` #### Using vsock Similarly to above, Linux [vsock](https://man7.org/linux/man-pages/man7/vsock.7.html) can be used to connect directly to sockets within VMs using `-o vsock=CID:PORT`. ``` # on the host socat VSOCK-LISTEN:12345 EXEC:"/usr/lib/openssh/sftp-server",nofork # on the clientside sshfs -o vsock=2:12345 unused_host: ./tmp ``` ## Installation First, download the latest SSHFS release from https://github.com/libfuse/sshfs/releases. You also need [libfuse](http://github.com/libfuse/libfuse) 3.1.0 or newer (or a similar library that provides a libfuse3 compatible interface for your operating system). Finally, you need the [Glib](https://developer.gnome.org/glib/stable/) library with development headers (which should be available from your operating system's package manager). To build and install, we recommend to use [Meson](http://mesonbuild.com/) (version 0.38 or newer) and [Ninja](https://ninja-build.org/). After extracting the sshfs tarball, create a (temporary) build directory and run Meson: ``` $ mkdir build; cd build $ meson .. ``` Normally, the default build options will work fine. If you nevertheless want to adjust them, you can do so with the *mesonconf* command: ``` $ mesonconf # list options $ mesonconf -D strip=true # set an option ``` To build, test and install SSHFS, you then use Ninja (running the tests requires the [py.test](http://www.pytest.org/) Python module): ``` $ ninja $ python3 -m pytest test/ # optional, but recommended $ sudo ninja install ``` ## Getting Help If you need help, please ask on the <[email protected]> mailing list (subscribe at https://lists.sourceforge.net/lists/listinfo/fuse-sshfs). Please report any bugs on the GitHub issue tracker at https://github.com/libfuse/sshfs/issues. ## Packaging Status <a href="https://repology.org/project/fusefs:sshfs/versions"> <img src="https://repology.org/badge/vertical-allrepos/fusefs:sshfs.svg" alt="Packaging status" > </a> ", Assign "at most 3 tags" to the expected json: {"id":"4416","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"