Skip to content

Instantly share code, notes, and snippets.

@intarstudents
Created July 7, 2012 12:45
Show Gist options
  • Save intarstudents/3066371 to your computer and use it in GitHub Desktop.
Save intarstudents/3066371 to your computer and use it in GitHub Desktop.
SSHFS mount script
#!/bin/bash
# Default ssh port
PORT=22
# If secound argument is number use it as PORT
if [ "$2" != "" ] && [[ $2 != *[!0-9]* ]] ; then
PORT=$2
fi
mkdir -p $HOME/Mount/$1
sshfs -p $PORT $1:/ $HOME/Mount/$1 -oauto_cache,volname=$1,defer_permissions,jail_symlinks,noappledouble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment