SSHFS How To
Advantage: simple, much safer than samba & nfs, support non-English when mounted in windows.
in linux, need ssh server
in win, need SFTP capable SSH server
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
Tip: Win-SSHFS will automatically ask for .net v4.6 if it is not yet installed.
OBS: win7 has limitations, dokan requires KB3033929.