SSHFS
SSHFS(Secure Shell FileSystem),可以让我们通过ssh的SFTP挂载远程的目录至本机
使用 -o指定选项,可指定mount的挂载选项
-
-o nonempty
可挂载于非空目录
-
-o reconnect
reconnect to server
-
-o allow_other
allow access to other users
- 手动挂载
sshfs -o nonempty,reconnect,allow_other,rw,nosuid,nodev,exec root@radical:/etc /mnt
- 开机自动挂载
root@radical:/root /mnt fuse.sshfs nonempty,reconnect,allow_other,_netdev,rw,nosuid,nodev,exec,IdentityFile=~/.ssh/id_rsa 0 0