SSH FileSystem on Mac
Tuesday, September 1st, 2009You can mount remote directory using ssh protocol using fuse. Fuse is an interesting mechanism to build a filesystem at userspace, i.e., without changing the OS Kernel.
You can install fuse using fink on OSX, but it is convenient to MacFUSE package (usually shipped with VMWare Fusion). And then download statically compiled sshfs-static-XXX from here. I put it under /usr/local/bin, and renamed to sshfs.
Now you can mount remote directory using sshfs onto your local filesystem.
$ /usr/local/bin/sshfs userid@server:/path/to/remote/dir /path/to/local/dir -o auto_cache,reconnect
Unmount is also simple
$ unmount /path/to/local/dir
.
If you see this warning message
warning: ssh nodelay workaround disabled
you may ignore it because recent ssh client that is shipped in Leopard supports TCP_NODELAY by default.
Good thing about sshfs is that you can configure it to reconnect, and locally cache the file. This means that even when your network isn’t fast enough, you will only suffer local disk I/O, and the sshfs will background transfer the changed data (more technically, disconnected operation is supported).
Enjoy!
