自强学堂
自强学堂:学习、分享、让你更强!
学习分享HTMLCSSJAVASCRIPTJQUERYSQLPHPBOOTSTRAPANGULARXML
 

Mac OSX 10.10 Yosemite 安装 sshfs 方便挂载远程目录

在ubuntu上很容易安装 sshfs,使用 sshfs 很容易把服务器上远程目录挂载到本地操作,非常方便。

在 Mac OSX 10.9的时候使用 brew 很容易安装 sshfs 

安装 brew 点击:http://brew.sh/index_zh-cn.html 或者把下面这个粘贴到终端就可以安装了

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安装  sshfs

brew install sshfs


可是升级后在 OSX 10.10 上却提示

mac:zqxt tu$ brew install sshfs
==> Downloading https://github.com/osxfuse/sshfs/archive/osxfuse-sshfs-2.5.0.tar
Already downloaded: /Library/Caches/Homebrew/sshfs-2.5.0.tar.gz
==> Patching
patching file sshfs.c
==> autoreconf --force --install
--force
--install

aclocal: error: aclocal: file '/usr/local/share/aclocal/wxwin.m4' does not exist
autoreconf: aclocal failed with exit status: 1

READ THIS: http://git.io/brew-troubleshooting

网上找了很多办法终于搞定

下载:osxfuse-2.7.3.dmg http://osxfuse.github.io/

下载:sshfs-2.5.0.pkg https://github.com/osxfuse/sshfs/releases/

都安装了就搞定了,安装后可能需要重启。


使用 sshfs 挂载远程目录到本地:

sshfs -C -o reconnect user@host:dir localdir

更多 sshfs 的用法可以 sshfs -h 查看。