Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save omar-yassin/3545a3dc4c52eca7e49556dc8ed3f601 to your computer and use it in GitHub Desktop.
Save omar-yassin/3545a3dc4c52eca7e49556dc8ed3f601 to your computer and use it in GitHub Desktop.
sshfs cheatsheet
#!/bin/bash
# USAGE (OSX) - Mount a remote servers directory locally to my workstation on /mnt/test/
# name_of_this_script remote_server.com:/var/cache /mnt/test
user=$(whoami)
ssh_identity_file="/Users/${user}/.ssh/id_rsa"
remote_host_and_path="${1}"
mount_locally="${2}"
sudo sshfs ${user}@${remote_host_and_path} ${mount_locally} \
-o IdentityFile=${ssh_identity_file} \
-o ServerAliveInterval=60 -o allow_other
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment