|
Usage
Usage and Tips
Featured Quick StartInstallIf your machine can run SSHFS, then SSHFS-MUX should also run without problem. Download stable package from here or checkout latest source code by $ hg clone https://sshfsmux.googlecode.com/hg/ sshfsmux To install prerequisite GNOME library in Debian/Ubuntu system, simply type $ sudo apt-get install libglib2.0-dev Then compile sshfsm as usual, $ ./configure $ make $ make install Mount$ sshfsm hostA:dirA hostB:/dirB hostC: mountpoint Unmount$ fusermount -u mountpoint *fusermount should be already installed if your system has FUSE. Advanced UsagePlease use "sshfsm -h" and "man sshfsm" for quick reference. Host AttributesSSHFS-MUX allows fine-grained control of how to connect a host by using host attributes. RankEach host is attached with a rank during the mount time, according the its appearance in command arguments. And host with higher rank is the place where file looking up first takes place and new files are created. For example, in following case, $ sshfsm hostA:dirA hostB:/dirB hostC: mountpoint the rank of hostA > the rank of hostB > the rank of hostC. When a file lookup, e.g. stat(), is issued, SSHFS-MUX first searches at dirA of hostA. If the target file is found, then it stops further searching and return to application. Otherwise, it continues search in hostB and hostC until the target file is found or returns ENOEXIST if the target file does not exist. When some file is newly created, e.g. mkdir() or creat(), it is also created in host with higher rank. Therefore, you can straightforwardly arrange hosts in command arguments based on your preference, e.g., distances from your local desktop. Local ModeLocal mode (l-mode) is useful when you want to merge and manipulate files in local server with files in remote servers. Though you can do $ sshfsm localhost: remotehost: mountpoint where SSHFS-MUX spans a connection to localhost and starts SFTP server as usuall. In following case, $ sshfsm localhost:=l remotehost: mountpoint SSHFS-MUX directly access the local file system using native file system calls instead of SFTP, which achieves a better performance. Also, you can use SSHFS-MUX as UnionFS/UnionFS-FUSE with local mode. For example, $ sshfsm localhost:/directory1=l localhost:/directory2=l mountpoint Preserve ModePreserve mode (p-mode) is like local mode, but uses unix domain socket to connect local sftp server, where "-o sftp_server=PATH" is used to specify the path of local SFTP server. This is option originally provided for developement, debug, and performance tuning. Using Raw Socket for High-Throughput TransferOption "-o directport=PORT" allows SSHFS/SSHFS-MUX to use raw sockets bypassing ssh channels and connect to remote sftp-server subsystem. This feature requires an intermediate server should wait connection on specified port and bridge SFTP server for you. Start a listen server on server side as follows server$ sshfsm -D [-p 5285] [-o sftp_server=PATH] and then connect to the server using client$ sshfsm -o directport=5285 server: mountpoint SInce using raw socket also bypasses the SSH authentication, it is not safe if we allow any client to connect the server. SSHFS-MUX implemented a simple challenge handshake protocol to authenticate client before establishing the SFTP connections. Therefore, users should provide pre-shared key files "~/.sshfsm/key" on both client and server sides with the same key stored in them. Also, it is strongly recommended that you shutdown server daemon by "killall sshfsm" after you finished using the file system. However, if you concern your data integrity and security, you should go back to SSH or try HPN-SSH. FAQSince SSHFS-MUX is fully compatible with SSHFS, please check SSHFS FAQ first. Bug ReportsPlease go to Issues page to report bugs and submit your feature requests. | |