I am trying to setup automount of SSH endpoints using automount and sshfs on macOS Catalina. However, it is not working and I am not sure why.
/etc/auto_master
+auto_master # Use directory service
#/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
# custom; auto-mount wolverine (parker lab setup)
/- auto_wolverine -nosuid
/etc/auto_wolverine
/System/Volumes/Data/wolverine/home -fstype=sshfs,reconnect,nodev,follow_symlinks,allow_other,StrictHostKeyChecking=no,IdentityFile=IDFILE,port=PORT,ServerAliveInterval=360,ServerAliveCountMax=3 USER@HOST:/home
/etc/sythetic.conf
wolverine /System/Volumes/Data/wolverine
I also symlinked the sshfs binary to /usr/local/bin/mount_sshfs as per one of the tutorials I saw.
However, when I try to open the target directory (after refreshing the mount), it says No such file or directory. Any help would be appreciated.
The problem here is that
automounttries to searchmount_sshfsinside/sbin. So, although you have created that symlink, it is not available forautomount.Since macOS Catalina,
/sbinis mounted as a read-only volume, so you won't be able to create the required symlink:/sbin/mount_sshfs -> /usr/local/bin/sshfs. You can find more information at Apple's support webpage.One thing that worked for me with previous versions to macOS 10.15 Catalina was disabling System Integrity Protection and creating the required symlink from the Recovery OS partition. But I don't know if this stills work with Catalina.
You can find how to disable SIP in this document.
If you finally manage to create the symlink, you'll probably need to add the following daemon to enable the kernel extension for automount:
Call it
load.osxfusefs.tunables.plistand put it inside/Library/LaunchDaemonYou can find a very well explained guide in this answer from Apple StackExchange.