faq-sshfs.md
... ...
@@ -1,8 +1,20 @@
1 1
# sshfs
2 2
3
-## using sshfs
3
+## Setting up sshfs on OS X (Mac) systems
4
+
5
+Installation requires administrative privileges.
6
+
7
+Prior to installing, you should make sure that [password-less
8
+ssh](faq-setting-up-passwordless-ssh.md) is configured correctly
9
+between the local system and the remote system.
10
+
11
+
12
+ 1. Download OSXFuse (`dmg`) (`pkg`) from <http://osxfuse.github.io>
13
+ 2. Open OSXFuse `dmg` , run installer
14
+ 3. Download SSHFS (`pkg`) from from <http://osxfuse.github.io>
15
+ 4. Run SSHFS installer `pkg`
16
+ 5. Create a folder to access the remote filesystems (aka a mount point): `mkdir /sshfs/`
4 17
5
-Usage does not require administrative privileges.
6 18
7 19
### Mounting remote filesystems with sshfs
8 20
... ...
@@ -16,33 +28,45 @@ words, that user's NFS home directory).
16 28
17 29
`umount /sshfs`
18 30
19
-On Linux, if you don't have root or sudo access, you can mount sshfs via a directory in your home directory. Just remember to specify the fill PATH to the directory. On Centos, you will need the `fuse-sshfs` package installed.
31
+On Linux, if you don't have root or sudo access, you can mount sshfs via a directory in your home directory. Just remember to specify th
32
+e fill PATH to the directory. On Centos, you will need the `fuse-sshfs` package installed.
20 33
34
+## OS X (Mac) helpful hints
21 35
22
-## Setting up sshfs on OS X (Mac) systems
36
+An example of mounting from OSX on your local system is as follows -
37
+`sudo mkdir -p /sshfs/userdocs`
38
+`sudo chown -R $USER /sshfs`
39
+`/usr/local/bin/sshfs oconnor@crystal.harvard.edu:/nfs/userdocs /sshfs/userdocs -o volname=userdocs,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,idmap=user,auto_xattr,dev,suid,defer_permissions,noappledouble,noapplexattr,IdentityFile=$HOME/.ssh/sshfs-id_rsa`
23 40
24
-Installation requires administrative privileges.
41
+Basically, your local user needs to own the destination $PATH. We mount one complete filesystem from the remote site(avoids local Apple Finder issues). We give the volume a name (shows mount point on your desktop), add some additional options for server connections, etc. If you are using an [ssh key](faq-setting-up-passwordless-ssh.md) you would add it's path to the IdentityFile paramater.
25 42
26
-Prior to installing, you should make sure that [password-less
27
-ssh](faq-setting-up-passwordless-ssh.md) is configured correctly
28
-between the local system and the remote system.
43
+On occasion the mount may become stuck or unresponsive you can force unmount via -
44
+`diskutil umount force /sshfs/userdocs`
29 45
30 46
31
- 1. Download OSXFuse (`dmg`) (`pkg`) from <http://osxfuse.github.io>
32
- 2. Open OSXFuse `dmg` , run installer
33
- 3. Download SSHFS (`pkg`) from from <http://osxfuse.github.io>
34
- 4. Run SSHFS installer `pkg`
35
- 5. Create a folder to access the remote filesystems (aka a mount point): `mkdir /sshfs/`
47
+## Using helper script
36 48
37
-## OS X (Mac) helpful hints
49
+There is a 'helper' script available that can be used with sshfs_nfs.app for mac to automount at login. The app is simply a wrapper for sshfs-helper.sh and assumes the script exists in /Users/Shared/
38 50
39
-A good example of mounting from OSX on your local system is as follows -
40
-`sudo mkdir -p /sshfs/userdocs`
41
-`sudo chown -R $USER /sshfs`
42
-`/usr/local/bin/sshfs oconnor@crystal.harvard.edu:/nfs/userdocs /sshfs/userdocs -o volname=userdocs,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,idmap=user,auto_xattr,dev,suid,defer_permissions,noappledouble,noapplexattr,IdentityFile=$HOME/.ssh/sshfs-id_rsa`
51
+If the mounts become stuck just rerun to reattach shares.
43 52
44
-Basically, your local user needs to own the destination $PATH. We mount one complete filesystem from the remote site(avoids local Apple Finder issues). We give the volume a name (shows mount point on your desktop), add some additional options for server connections, etc. If you are using an [ssh key](faq-setting-up-passwordless-ssh.md) you would add it's path to the IdentityFile paramater.
53
+`scp $USER@crystal.harvard.edu:/nfs/staff/shared/sshfs-helper.sh .`
54
+
55
+First run use sudo to create /nfs mount points.
56
+
57
+`sudo sshfs-helper.sh`
58
+
59
+The script will create a file in your home folder called `.sshfs-mounts`
60
+
61
+You can add or change any number of mounts that sshfs-helper.sh -
62
+
63
+To open -
64
+`open .sshff_mounts` then edit in textedit.app.
65
+
66
+An example -
67
+`#USER@HOST REMOTE_FOLDER LOCAL_FOLDER | empty local folder must exist`
68
+`oconnor@sshfs.sbgrid.org /nfs/userdocs /nfs/userdocs`
69
+`jo232@transfer.o2.hms.harvard.edu /home/myfolder /nfs/o2home`
45 70
46
-On occasion the mount wll become stuck and unresponsive, so you may be required to force unmount it before mounting it again.
47
-`umount -f /sshfs`
71
+You must create the destination folder like - `mkdir /nfs/o2home`
48 72