使用ssh协议挂载远程文件目录

安装sshfs

命令:sudo apt-get install sshfs

使用modprobe加载模块

命令:sudo modprobe fuse

设置权限

把下面的<username>替换成自己的用户名

sudo adduser <username> fuse

sudo chown root:fuse /dev/fuse

创建本地挂载目录

mkdir ~/remotedir

挂载远程目录

sshfs <username>@<ipaddr>:/remotepath ~/remotedir

如果ssh的端口不是默认端口,则把<ssh_port>替换成自定义的端口:

sshfs <username>@<ipaddr>:/remotepath ~/remotedir -p <ssh_port>

posted @ 2015-08-07 12:54  MagicLetters  阅读(497)  评论(0编辑  收藏  举报