Skip to content

Instantly share code, notes, and snippets.

Last active March 25, 2022 15:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Script to mount GPU server drive on Mac OS - requires SSHFS and MacFUSE
remotedir="bob@" # TODO Add directory on the remote machine
mountdir="/Users/bob/gpu" # TODO Add local directory
echo "Mounting (${mountdir})..."
#Unmount if it's already mounted
if mount | grep "on $mountdir" > /dev/null; then
umount ${mountdir}
#Now mount the remote file system
# (The -o workaround=rename -o noexec are used so kwrite can save files.)
sshfs -o ssh_command='ssh -AKXY' -o workaround=rename -o noexec -o idmap=user -o uid=$(id -u) -o gid=$(id -g) ${remotedir} ${mountdir}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment