Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Securely mount AppleShare volumes in one step' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Securely mount AppleShare volumes in one step
Authored by: Asmus Vierck on Fri, Mar 21 2008 at 12:37PM PDT
You could ease the process of connecting a lot if you use the following one-liner:

ssh username@server.xyz -f -N -L 10548:127.0.0.1:548 2>/dev/null & (sleep 5; open 'afp://localhost:10548/username/Documents/Office')

It will return the pid of the ssh-tunnel issued and you can kill it afterwards by entering "kill [ number returned above ]". Just be sure to have unmounted the server-partition in Finder before.
The "sleep 5" part above depends on your connection speed and you should set it accordingly.

[ Reply to This | # ]
Securely mount AppleShare volumes in one step
Authored by: mubarak on Sat, Mar 22 2008 at 6:18PM PDT
Thanks for the tip about using the open command and escaping the afp URL. (Couldn't get it to work myself.)

However, what you are doing requires going back into Terminal and killing the process. Doesn't pass the Grandma test. Here is what you can do so that you don't have to fiddle with Terminal:

ssh -f -L 7777:localhost:548 user@work.dyndns.org sleep 30 ; open 'afp://user@localhost:7777/user' ; exit


[ Reply to This | # ]