安裝
Centos 安裝套件後,使用者必須加入fuse群組才能使用FUSE功能
yum install fuse-sshfs設定
usermod -a -G fuse username
新增/etc/fuse.conf,增加以下內容,掛載時才可以使用-o allow_other參數
# Allow non-root users to specify the 'allow_other' or 'allow_root'手動掛載
# mount options.
#
user_allow_other
如果想要讓資料夾可以被帳號以外的其他使用者帳號存取可加入-o allow_other參數
sshfs -o allow_other username@IP:/path/to/folder /path/to/local/folder手動缷載
fusermount -u /path/to/local/folder開機自動掛載
/etc/fstab下新增 (SSH Trust要先做好!!!)
username@ip:/path/to/folder /path/to/local/folder fuse.sshfs idmap=user,identityfile=/home/username/.ssh/id_dsa,allow_other,uid=User_uid,gid=User_gid 0 0
資料來源:
http://blog.miniasp.com/post/2013/11/30/Useful-tool-SSHFS-SSH-Filesystem.aspx
http://what-a-good-day.blogspot.tw/2015/05/ssh-mount-linux.html
http://unix.stackexchange.com/questions/37168/unable-to-use-o-allow-other-with-sshfs-option-enabled-in-fuse-conf
http://fuse.sourceforge.net/
https://www.variux.com/sshfs-automount-at-boot-with-fstab-on-ubuntu-14-04/