需求:
通过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://stackoverflow.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 extension will need to be unloaded before installing the new version. First, check that no FUSE-based file systems are running: mount -t osxfusefs Unmount all FUSE file systems and then unload the kernel extension: sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs The 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