1、安装brew cask
brew install cask会报错。
会提示clone into /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask…
可以直接从github上进行clone,
git clone git://mirrors.ustc.edu.cn/homebrew-cask.git /opt/homebrew/Library/Taps/homebrew/homebrew-cask
即可成功。
2、安装osxfuse
brew install --cask osxfuse
3、安装sshfs
brew install sshfs
4、挂载
(1)新建本地挂载点
mkdir local-file
(2)挂载
远程的地址最好使用绝对路径。此时打开该文件夹就可以访问远程文件了。
sshfs user@hostname:/absolute/path/to/document local-file
(3)卸载挂载文件
umount local-file