Gentoo Archives: gentoo-user

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How to automate an sshfs (fusermount) mounted share
Date: Sat, 03 Jan 2015 15:42:30
Message-Id: 20150103184215.481fa1f4ceddd6aa9906b1ee@gentoo.org
In Reply to: [gentoo-user] How to automate an sshfs (fusermount) mounted share by Harry Putnam
1 Hi,
2
3 On Sat, 03 Jan 2015 09:23:29 -0500 Harry Putnam wrote:
4 > I'm sshfs mounting an solaris zfs file system in the interactive
5 > fashion.
6 >
7 > sshfs $USR@HOST:/file/system MOUNTPOINT
8 > passwd?
9 > enter passwd <RETURN>
10 >
11 > Once mounted I run an rsnapshot backup onto the mounted FS.
12 >
13 > Any ideas on how to go about doing this mount automatically (scripted)
14 > will be greatly appreciated.
15
16 1) Set up your ssh to use keys. Key itself should not be protected
17 by password (or manual intervention will be needed on each mount).
18
19 2) Add sshfs command to your .bash_profile (or whatever login shell
20 you're using) with check that filesystem is not mounted already,
21 something like:
22 grep -q $MOUNTPOINT || sshfs $USR@HOST:/file/system MOUNTPOINT
23
24 Alternatively you may add this to your DE/WM autostart scripts, if
25 you are using GUI logins only.
26
27 Best regards,
28 Andrew Savchenko

Replies

Subject Author
Re: [gentoo-user] How to automate an sshfs (fusermount) mounted share Simon Thelen <gentoo-user@××××.de>