Thread: SSHFS automount
View Single Post
Posts: 14 | Thanked: 3 times | Joined on Aug 2007
#1
For reference, see:

FusePort
AutoMount

I'm a new 770 user this week and a geek.. so among other things, I'm working on remote connectivity to my home network and resources.

CIFS/Win mounts locally worked OK, but I never tried to automount since the 770 isn't always on my home network.

SSHFS is a solution to that - secure mounting to remote resources from anywhere with a public IP.

I installed the FUSE software above and it works - I can mount drives over the local 802.11 and over my BT DUN phone. I haven't tried another AP yet, but I'm confident it'll work (the SSHFS is on a publicly SSH'able box, and I have the no-password auto RSA authentication working fine for both user and the root account)

I thought I'd take it to the next level and automount (see the second link) the FS - and get fancier and automount/unmount when the network goes up/down.

First off, I tried a few variations in /etc/fstab with the FUSE mounts and none of 'em worked, using root or user.

I bailed on that, and instead thought I'd try an ifup/ifdown script using sshfs and fusermount explicitly naming the mounts.

The script works if I run it through xterm.

I put it into /etc/network/if-up.d (and if-down.d), but either it isn't called, or it fails (it looks like there isn't a "messages" log on the 770, probably to save precious space).

Root and User both have the RSA keys set up for no-prompt ssh connection to the SSH server in question.

Does the if-up script run as another user account? Not root, not user, but something else? If so, what?

Should I have been able to use /etc/fstab?

If I can get it figured out, the next step after auto-mount is to also decide if I'm on my home network, or remote - and if home, use CIFS instead of SSHFS - it seemed faster, and then I can leave the Compression on the SSHFS, too (making the assumption I'm connecting remotely and bandwidth could be at a premium)

I haven't ordered a BT keyboard yet, but it'll happen soon - that'll make hacking MUCH better. It's hard to ssh /vnc into the 770 and make adjustments when part of the process involves taking down the network connection and bringing it back up.