Created
April 8, 2019 15:48
-
-
Save omar-yassin/3545a3dc4c52eca7e49556dc8ed3f601 to your computer and use it in GitHub Desktop.
sshfs cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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