How to mount remote SFTP (SSH) file system on your Mac

Have you ever wanted to have direct access to an SFTP (SSH) file system directly in the Finder on your Mac? With the help of OS X Fuse and SSHFS, you can!
STEP 1: Download and install the latest versions of OS X FUSE and SSHFS from this site: http://osxfuse.github.io/
STEP 2: Create a mount point on your file system. In Terminal, run a command like this, customizing it for your environment:
mkdir ~/SFTP/ServerName
STEP 3: Use Terminal to mount the remote server. Note that in order to ensure that read-write access works correctly, you should add the “defer_permissions” as shown below. Additionally, the “noappledouble” option greatly speeds up SSHFS file system acccess on Macs.
sshfs -o IdentityFile=~/ssh/id_rsa -o defer_permissions -o noappledouble login@servername.com:/path/on/remote/server ~/SFTP/ServerName
That’s it! You should now have access to the SFTP share in the Finder.

5 Comments

  1. An old post, but still works on OSX 10.14.5 (Mojave), although os prompts that FUSE will not be compatible in future updates…
    Thank you Steve!!

  2. Thanks

    I used home homebrew for the installation.

    If not ready installed, install homebrew:

    1) Open the terminal and paste the following command:

    /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”

    2) After the installation of homebrew install osxfuse by pasting the following command in the terminal:

    brew cask install osxfuse

    3) After the installation of osxfuse install SSHFS by pasting the following command in the terminal:

    brew install sshfs

    4) After the installation of SSHFS create a folder where the remote server will be mounted e.g.:

    mkdir ~/SSHFS/remoteserver

    5) When the folder is created use the following example to mount the server:

    sshfs -o IdentityFile=~/ssh/id_rsa -o defer_permissions -o noappledouble -o volname=REMOTE_SERVER usernamel@servername.net:/var/www ~/SFTP/remoteserver -C

    When the server is behind your router and you have defined port forwarding form WAN to LAN you must set your port e.g. by adding -p xxxxx (xxxxx = your wan port number)

    Good luck!

Leave a Reply

Your email address will not be published.


*