Mount a Remote system as a drive on OSx using SSH

Recently I ran into a situation where I needed to mount a remote system folder on my OSx for ease of sharing and convenience. You can totally do without this by just using the terminal. However, writing this hoping to help those who need to do this for one or the other reason.

1. Install Fuse and SSHFS

Download FUSE and SSHFS from OSx Fuse site. Follow the instructions to install Fuse, followed by SSHFS.

2. Create a folder on your mac. This will be the mount point of the remote folder.

anjanas:~ $ ls
Applications Library  Public  id_rsa
Desktop  Movies  PycharmProjects test.txt
Documents Music  dev-vm-mount workspace
Downloads Pictures dwhelper
anjanas:~ $ mkdir mount
anjanasblrmbp:~ $ ls
Applications Library  Public  id_rsa
Desktop  Movies  PycharmProjects mount
Documents Music  dev-vm-mount test.txt
Downloads Pictures dwhelper workspace

3. Create a keyless access to your server

Refer this link for the same.

4. Mount the remote system as a folder on OSx

sshfs -o IdentityFile=~/.ssh/id_rsa anjana@remote.ip:/home/anjana/workspace ~/mount

Now you can treat the remote folder as any other folder on your machine.

Unmounting this system can be achieved as follows:

sudo diskutil umount force ~/mount

That’s it for this post.
References: Mount a remote system as a drive on Mac OSx

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s