需求:
通过Mac浏览器直接打开linux服务器指定的目录
方案:
sshfs http://www.howtogeek.com/howto/ubuntu/how-to-mount-a-remote-folder-using-ssh-on-ubuntu/brew install sshfs
brew install osxfuse
ssh remote_user@XXX.XXX.XXX.XXX
sshfs -C -o reconnect remote_user@XXX.XXX.XXX.XXX:/ /local_dir
执行最后一步的命令可能会碰到错误如下:
the OSXFUSE file system is not available
解决方法:http://*.com/questions/24309293/why-cant-i-setup-an-sshfs-share-osxfuse-file-system-is-not-available-error
完美解决我碰到的问题,下一步研究怎样通过UI去管理文件目录:If upgrading from a previous version of osxfuse, the previous kernel extensionwill need to be unloaded before installing the new version. First, check thatno FUSE-based file systems are running: mount -t osxfusefsUnmount all FUSE file systems and then unload the kernel extension: sudo kextunload -b com.github.osxfuse.filesystems.osxfusefsThe new osxfuse file system bundle needs to be installed by the root user: sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs