Gangmax Blog

Mount Remote Directory via SSH to Local on Mac

From here.

First, Make sure you have Homebrew installed.

1
2
3
4
5
6
7
# Install FUSE.
# Restarting was required after I executed the following command.
brew cask install osxfuse
# Install sshfs.
brew install sshfs
# Mount the target remote directory to local.
sudo sshfs -o allow_other,defer_permissions,IdentityFile=~/.ssh/id_rsa user@host:/data/ /Users/user/data

Added on “2021-06-22”.

Recently I migrated to a new MBP(Big Sur 11.4) and found the “sshfs” didn’t work. When I run the following command to install “sshfs”, I get an error:

1
2
~> brew install sshfs
Error: sshfs has been disabled because it requires FUSE!

The solution comes from here:

  1. Go to the “macFUSE“ official website.

  2. Download “macFUSE 4.1.2“ and “SSHFS 2.5.0“, install them.

Now you should be able to use “sshfs”.

Comments