My name is Sven Andersson and I
work as a consultant in embedded
system design, implemented in ASIC
In my spare time I write this blog
and I hope it will inspire others to
learn more about this fantastic field.
I live in Stockholm Sweden and have
my own company
You are welcome to contact me
and ask questions or make comments
about my blog.
We have already seen that we can login to the Ubuntu guest using ssh and that we can transfer files using sftp. Now let's find out how we can mount a file system from Ubuntu in our host computer.
SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation. SFTP provides secure file transfer and a secure remote file system. While SFTP clients may transfer files and directories, the related file system may not be mounted locally using SFTP alone. Using SSHFS a remote file system may be treated in the same way as other volumes (such as CDs, DVDs, USB flash drives and shared disks). Let's take the easy path and use some available software.
ExpanDrive is a Network file system client for Mac OS X and Microsoft Windows that facilitates mapping of local volume to any SFTP server the user can access. It also can connect to FTP, Amazon S3, RackSpace Cloud Files, OpenStack Swift Object Storage, DreamObjects, WebDAV, Dropbox, Google Drive and Box.com. When a server is mounted with ExpanDrive any program can read, write, and manage remote files (that is, files that only exist on the server) as if they were stored locally.
Download and install
We will download a free trial version for a start.
We will fill in the values for our Ubuntu guest and click Connect.
The home directory of our Ubuntu guest is mounted in Mac OS X and visable in the Finder.
Click Reveal to update file system display.
Using sshfs from the command line
SSH’ing to a server and doing all the configuration through terminal is easy and very fast, but when we want to edit files and set a remote development environment on our local machine, mounting a remote filesystem over ssh and editing them as the files were in your computer is the way to go. Right now I’m using OSX Mavericks (OSX 10.9), so for mounting a remote system we will need to do some tricks and tweaks to have it working. I will try to explain step-by-step on how to do it.