How To Use SSHFS on macOS

Using sshfs is a great way to mount a remote drive from AWS, Azure, or any remote machine to your local mac. Installing sshfs is a relatively straightforward process.

Prerequisites & Installation

Be sure that you can SSH to your target machine using SSH keys. If you’re remote machine is a Windows machine you may need to setup SSH.

Download and Install the OSXFuse and SSHFS packages as admin.

Create a local folder to access your remote filesystem.

mkdir /tmp/sshfs

Mount Filesystem

Example usage of sshfs.

sshfs username@remote:/remote/directory /mount/point

Unmount Filesystem

If you cant eject the drive in finder can force the unmount.

diskutil umount force /mount/point

Debugging Connection Issues

Sometimes you may want a more verbose output when trying to mount a drive with sshfs. This can help you diagnose connection-related issues etc.

sshfs -odebug,sshfs_debug,loglevel=debug username@remote:/remote/directory /mount/point

Want to learn how to use SSHFS on Windows?

If you’d like to comprehensive tutorial on how to setup SSHFS on Windows you can follow this tutorial in which I go through the downloading and installation of SSHFS on Windows.

Other Resources

If this blog post was helpful, check out some of my other blog posts. I post routinely on general information technology, programming, and cybersecurity topics.

Need some more help?

I’m always here to help if you run into any issues, reach out on social media!

Previous
Previous

Decrypt Traffic with Mitmproxy & Wireshark

Next
Next

How I passed the AZ-900 Microsoft Azure Fundamentals Exam