Created
February 14, 2011 15:49
-
-
Save miku/826062 to your computer and use it in GitHub Desktop.
Using tsocks with macfusion sshfs (sshfs-static) on Mac OS X 10.6
This file contains 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
There has been some trouble running magical tsocks with sshfs-static on Leopard. | |
$ tsocks sshfs user@example.com: /Volumes/example.com -oauto_cache,reconnect,volname=example.com | |
dyld: could not load inserted library: /usr/lib/libtsocks.dylib | |
Trace/BPT trap | |
Here, sshfs is just a symlink to the sshfs-static executable | |
(from a current build of https://github.com/mgorbach/macfusion2). | |
$ ll ~/bin/sshfs | |
.... ~/bin/sshfs@ -> ~/projects/macfusion2/build/Release/sshfs.mfplugin/Contents/Resources/sshfs-static | |
Solution (or say workaround) turns out to be quite simple. | |
sshfs allows to specify a command to use instead of the default | |
`ssh` with the `ssh_command` option: | |
$ sshfs -h | |
... | |
-o ssh_command=CMD execute CMD instead of 'ssh' | |
... | |
Now just create a wrapper shell script around ssh, with tsocks in front: | |
$ cat ~/bin/tsocksssh | |
#!/bin/sh | |
tsocks ssh $@ | |
And use this as `ssh_command`, like so: | |
$ sshfs user@example.com: /Volumes/example.com -oauto_cache,reconnect,volname=example.com \ | |
-ossh_command=tsocksssh -oworkaround=rename | |
The remote is now mounted with the aid of tsocks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment