把远程SSH主机当作自己的硬盘

  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid/gid is 1400/1400 is not allowed to access /tmp owned by uid/gid 0/0 in /home/wangxum1/public_html/site/includes/file.inc on line 190.
  • warning: realpath() [function.realpath]: SAFE MODE Restriction in effect. The script whose uid/gid is 1400/1400 is not allowed to access /tmp owned by uid/gid 0/0 in /home/wangxum1/public_html/site/includes/file.inc on line 190.

这个就是 sshfs 啦,基于著名的 fuse,也就是 Filesystem in User Space framework。

对于 debian 用户,直接 apt-get 就可以安装,很方便,其他用户去主页上看看吧,呵呵。安装之后,直接

sshfs username@host: mount_point

就把远程主机的主目录挂载上了,其中,umask, user 等几个参数可能会用到,看看 manpage 吧

用完之后

fusermount -u mount_pouint

是卸载

呵呵,这个远程访问的方式很方便的说 :)