SSHFS How To
Advantage: simple, much safer than samba & nfs, support non-English when mounted in windows.
See Also Links SFTP: FTP over SSH NFS CIFS/SMB/Samba
SERVER #
in linux, need ssh server with sftp support #
Note that many routers’ Linux ROM does not support SFTP (SSH File Transfer Protocol).
in win, need ssh server with sftp support #
For instance, OpenSSH-powershell for Windows. See here for detailed steps. OBS 1: sshfs works, but ssh to win will get win-cmd UI OBS 2: pub key login seems NOT working ??? WARN: the whole C: disk will be shared as root.
LINUX AS CLIENT #
WARN: use absolute path (instead of relative path) format for both server and client ! (no error for relative path, but cannot mount)
sudo apt-get install sshfs && \
echo 'user_allow_other' > /etc/fuse.conf && \
sudo mkdir /mnt/share && \
sudo sshfs -o allow_other,reconnect,ServerAliveInterval=15 [email protected]:/ /mnt/share
# or, with key:
sudo sshfs -o allow_other,reconnect,ServerAliveInterval=15,IdentityFile=~/.ssh/id_rsa [email protected]:/ /mnt/share
OBS 1: option allow_other will permit others non-root to read and write files as root (similar to NFS).
OBS 2: be careful of default_permissions option: this option make allow_other NOT useful, others non-root cannot access the folder.
Tip 1: for permanent mount, see digitalocean.
Tip 2: for error “Transport endpoint is not connected”, run “umount -l /mnt/share”, l means lazy clean.
WINDOWS 10 AS CLIENT #
- Install Dokan, 不知道用哪个文件的,直接用 DokanSetup.exe 这个通用安装版。 (old: Dokan v1).
- Install Win-SSHFS, 注意使用 Latest 版本,不要用 Pre-release. ( old: Win-SSHFS v1.6 pre-release) (no process shown, will create a shortcut on desktop)
- Run desktop shutcut, fill ssh server login info and “save”, then “mount”.
- Done.

Tip: Win-SSHFS will automatically ask for .net v4.6 if it is not yet installed.
OBS: win7 has limitations, dokan requires KB3033929.
REF #
igikorn.com to mount in linux, see DigitalOcean.com