Ubuntu 9.10 remote mounts via sshfs

Hey just a fast post here.. I’ve been using sshfs on Ubuntu (meh, linux in general) for awhile as a means of securely remotely accessing my files. I’ve taken some steps to add a line to my /etc/fstab file to make this run smoothly…

Though today I ran in to a really weird situation. I found that despite having a uid=xxxx line, the appropriate user wasn’t getting ownership of the mount. In fact, when that user would look at the permissions for the mount, it returned something like “d???? ? ? ?”. Whisky Tango Foxtrot.

Well, turned out the problem was a result of how I had my fstab arranged.

The ‘fix’ feels like a “flaky hack” to me. I had to put "port=22,comment=sshfs" at the front of the options section for the sshfs lines in my fstab. I had previously had this stuff towards the end of that section and I really would expect it not to matter. But it did.

In general, you too can add a line to your sshfs, try something like this:

sshfs#remoteusername@hostname.domain.tld:/home/remoteusername /media/remoteblahwhatever fuse port=22,comment=sshfs,BatchMode=yes,user,noauto,uid=1000,gid=1000,follow_symlinks,defaults 0 0

For more on that do a google search, you’ll find lots of good stuff on it. Just keep in mind that you may want to setup pre-shared keys for ssh, you know, add whatever to your ~/.ssh/authorized_keys to help with the mounts.. blah, go look that stuff up.

Anyway, whatever – hope that helps someone

2 comments to Ubuntu 9.10 remote mounts via sshfs