Skip to content

Instantly share code, notes, and snippets.

@victoryang00
Created June 15, 2021 15:50
Show Gist options
  • Save victoryang00/ae05af776aefdd97eb4480fa0734b5fd to your computer and use it in GitHub Desktop.
Save victoryang00/ae05af776aefdd97eb4480fa0734b5fd to your computer and use it in GitHub Desktop.
Mount sshfs on Big Sur 21

Intro

The basic need to grab data from linux chasis.

Basic System Info

$ uname -a
Darwin yiweis-iMac 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
$ otool -L ./sshfs                                                                                              23:41:28
./sshfs:
	/usr/local/lib/libfuse.2.dylib (compatibility version 12.0.0, current version 12.9.0)
	/usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 6801.0.0, current version 6801.2.0)
	/usr/local/opt/glib/lib/libgthread-2.0.0.dylib (compatibility version 6801.0.0, current version 6801.2.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
brew install osxfuse
brew install fuse
brew install cmake meson ninja
brew unpack --patch sshfs
# To the latest version from homebrew formula is 3.7.1
wget https://github.com/osxfuse/sshfs/archive/osxfuse-sshfs-2.5.0.tar.gz
tar -xzf osxfuse-sshfs-2.5.0.tar.gz --strip-components 1 -C ./sshfs-3.7.1
cd sshfs-3.7.1
sed 's/include <fuse_darwin.h>/\/\/# include <fuse_darwin.h>/g' sshfs.c > sshfs.c.new && mv sshfs.c.new sshfs.c
sed 's/sshfs_deps = [ dependency('fuse3', version: '>= 3.1.0'),/\/\/sshfs_deps = [ dependency('fuse', version: '>= 2.9.0'),/g' meson.build > meson.build.new && mv meson.build.new meson.build
# Build
mkdir build
cd build
ninja
mkdir /usr/local/Cellar/sshfs
meson --prefix=/usr/local/Cellar/ ..
ln -sf /usr/local/Cellar/sshfs/bin/sshfs /usr/local/bin

If you want the compiled version, you can download from down below.

wget https://github.com/victoryang00/sshfs-gui/releases/download/bigsur/sshfs-gui.dmg

Ref

  1. https://www.reddit.com/r/macapps/comments/lea865/how_to_install_sshfs_on_big_sur/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment