Read Post

Accessing OpenWRT Filesystem as a Remote Drive with OSXFUSE

OpenWRT is an open source wireless router software based-on Linux system. As with the rest of other Unix systems, it supports ext2/3/4 file system. Transferring files between different file system is not an issue as long as an SFTP server is installed on OpenWRT and SFTP client is installed on your desktop computer. However, recently, I found a better way to drag-n-drop or copy-n-paste files on the OpenWRT file system mounted as a remote drive on my Mac through OSXFUSE and SSHFS. Read on if you want to know how to do it. This guide should also work on any Linux/Unix other than OpenWRT.

FUSE for OS X allows you to extend OS X’s native file handling capabilities via third-party file systems. OSXFUSE is a successor to MacFUSE, which has been used as a software building block by dozens of products, but is no longer being maintained. In more technical terms, OSXFUSE implements a mechanism that makes it possible to implement a fully functional file system in a user-space program on OS X. It provides multiple APIs, one of which is a superset of the FUSE API (file system in user space) that originated on Linux. Therefore, many existing FUSE file systems become readily usable on OS X. OSXFUSE can be downloaded from here.

SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH File Transfer Protocol (SFTP), a network protocol providing file access, file transfer, and file management functionality over any reliable data stream that was designed as an extension of the Secure Shell protocol (SSH) version 2.0. You can download SSHFS for Mac OS X from here. If you don’t like to use Terminal to login to remote drives, you might also want to download the GUI from here or here.

Alternatively, if you have Macports installed, you can do sudo macport install osxfuse sshfs sshfs-gui. This will install OSXFUSE and SSHFS version of Macports and also a simple GUI. To mount a remote drive, do these from Terminal app:

mkdir /path/to/mountpoint
sshfs username@server:/path/to/remote/location /path/to/mountpoint

Mounting point can be anywhere, but I do love to follow the convention where every mounted drive on OS X stays under /Volumes. Everytime remote drive is ejected/unmounted, the mount point /path/to/mountpoint has to be recreated the next time you want to work with it. If you use sshfs-gui, it will help you create temporary mount point automatically. That’s all folks. Hope this post useful for you all!

← Prev