Hi all,

  I was just playing around with automounting as described on the
wiki:

http://code.google.com/p/macfuse/wiki/AUTOMOUNTING

I had some difficulty, but resolved it and thought I'd post so that
others don't have to spend as long figuring it out.

There were two issues that I had.  The first was related to ssh key-
based authentication.  I have had this set up for years with a
password on my private key, and with ssh-agent (default under
leopard).  It turns out that automount runs the mount process as the
user requesting access, but without the ssh-agent environment
variables set.  sshfs cannot access my private key.  There is also no
terminal access to enter the password, so the connection fails with a
generic and unhelpful error message.  You can solve this by generating
a second passwordless, and hence slightly less secure, key to be used
by the automounter.  You can then use your ~/.ssh/config to add this
key as an additional IdentityFile.  Once you authorize this identity
on the remote machine, sshfs automounting will succeed.

Unfortunately, with that fix the login succeeded but access only
succeeded on the second attempt.  e.g.

$ ls /Network/myserver
$ ls /Network/myserver
a-file                              another-file

There seems to be a race condition and the first access to the
directory is starting after mount_sshfs has returned, but before the
mount is actually available.  A workaround is easy.  Rather than
having mount_sshfs be a link to the sshfs binary, I made it a shell
script which calls sshfs and then sleeps for one second before
exiting.  The sleep only affects you when mount_sshfs is called - only
the first access.  This solves the race condition.

Be well,

Will           :-}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MacFUSE" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/macfuse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to