Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sshfs automount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
henning_bravo
Apprentice
Apprentice


Joined: 11 Apr 2007
Posts: 197

PostPosted: Sun Apr 27, 2008 9:02 pm    Post subject: sshfs automount Reply with quote

Hello!

I'm using sshfs to mount a remote file system. How can I make it mount on boot (as a regular user). I don't mind if I have to enter the password the first time entering the folder. But how do I do it without having to type:
Code:
sshfs user@host:/folder/ mountpoint

the first time?

Thanks!
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Sun Apr 27, 2008 9:06 pm    Post subject: Re: sshfs automount Reply with quote

henning_bravo wrote:
Hello!

I'm using sshfs to mount a remote file system. How can I make it mount on boot (as a regular user). I don't mind if I have to enter the password the first time entering the folder. But how do I do it without having to type:
Code:
sshfs user@host:/folder/ mountpoint

the first time?

Thanks!


I have this in my fstab.

Code:
sshfs#cereza@server:/home/cereza /home/i92guboj/clara fuse users 0 0


Note that, if you want, you can set up authentication via dsa keys, that way, you don't need a password. If you are interested in key authentication, read this:

http://www.gentoo.org/proj/en/keychain/
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
henning_bravo
Apprentice
Apprentice


Joined: 11 Apr 2007
Posts: 197

PostPosted: Mon Apr 28, 2008 4:28 pm    Post subject: Reply with quote

fstab... Smart! =)

But why the users flag when mounting?
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Mon Apr 28, 2008 4:43 pm    Post subject: Reply with quote

henning_bravo wrote:
fstab... Smart! =)

But why the users flag when mounting?


For the sake of convenience. For some reason, this doesn't mount at startup.

So, it's the user the one who needs to mount it when needed. I can live with that. Having that line in fstab is still useful, because I can just type "mount clara" in that folder, instead of the whole mount line.

The problem is, I think, the since sshfs is based on ssh, the drive would anyway be mounted with the permissions of the user who is mounting it, and it's his/her private key the one that authenticates against the public part of the key that resides on the server. I have tried playing with the options of sshfs (which could use a better documentation, by the way), but I haven't found a better way to do this.

When I need to mount something automatically at startup, I just use nfs, which is odd enough as we all know, but at least, it just works.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
Sedrik
l33t
l33t


Joined: 08 Apr 2005
Posts: 655
Location: Uppsala, Sweden

PostPosted: Mon Jul 28, 2008 10:03 pm    Post subject: Reply with quote

Has there been any progress made to this solution? Auto mounting at boot would be lovely (entering password during first connection is acceptable).

If not, I am still thankfull for the hint :)
_________________
From Gentoo with love
Back to top
View user's profile Send private message
Mr. Tao
Tux's lil' helper
Tux's lil' helper


Joined: 20 Jul 2007
Posts: 147

PostPosted: Tue Jul 29, 2008 12:06 am    Post subject: Reply with quote

In the past I've used automounter to mount sshfs according to [url=http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS)]wiki[/url]. I had it configured such way that mounting occured on-access.
Back to top
View user's profile Send private message
rada
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 202
Location: Ottawa, Canada

PostPosted: Tue Jul 29, 2008 10:27 pm    Post subject: Reply with quote

how about mounting a directory which only has root permissions on the host server but you want also user permissions on the client-mounted dir?
Back to top
View user's profile Send private message
baeksu
l33t
l33t


Joined: 26 Sep 2004
Posts: 609
Location: Seoul, Korea

PostPosted: Wed Jul 30, 2008 12:59 am    Post subject: Reply with quote

rada wrote:
how about mounting a directory which only has root permissions on the host server but you want also user permissions on the client-mounted dir?


You use root for the user on the host. I have the following line on my autofs config file (host name: slug):

Code:
slug -fstype=fuse,rw,sync,nodev,nonempty,noatime,allow_other,Max_Read=65536 :sshfs\#root@slug\:/


You have to copy the keys to the host so that you can make an ssh connection without giving a password. Also, log in once using root on your client, so that the host fingerprint is added to your .ssh/known_hosts.
_________________
Gnome:
1. A legendary being.
2. A never ending quest to make unix friendly to people who don't want unix and excruciating for those that do.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum