1 |
On 15-01-03 at 18:42, Andrew Savchenko wrote: |
2 |
> Hi, |
3 |
> |
4 |
> On Sat, 03 Jan 2015 09:23:29 -0500 Harry Putnam wrote: |
5 |
> > I'm sshfs mounting an solaris zfs file system in the interactive |
6 |
> > fashion. |
7 |
> > |
8 |
> > sshfs $USR@HOST:/file/system MOUNTPOINT |
9 |
> > passwd? |
10 |
> > enter passwd <RETURN> |
11 |
> > |
12 |
> > Once mounted I run an rsnapshot backup onto the mounted FS. |
13 |
> > |
14 |
> > Any ideas on how to go about doing this mount automatically (scripted) |
15 |
> > will be greatly appreciated. |
16 |
> |
17 |
> 1) Set up your ssh to use keys. Key itself should not be protected |
18 |
> by password (or manual intervention will be needed on each mount). |
19 |
> |
20 |
> 2) Add sshfs command to your .bash_profile (or whatever login shell |
21 |
> you're using) with check that filesystem is not mounted already, |
22 |
> something like: |
23 |
> grep -q $MOUNTPOINT || sshfs $USR@HOST:/file/system MOUNTPOINT |
24 |
> |
25 |
> Alternatively you may add this to your DE/WM autostart scripts, if |
26 |
> you are using GUI logins only. |
27 |
Or just add it to /etc/fstab: |
28 |
user@host:/mountpoint /where/to/mount fuse.sshfs rw,exec,async,_netdev,auto,user,idmap=user,transform_symlinks,identityfile=/path/to/ssh/key,allow_other,default_permissions,uid=1000,gid=100 0 0 |
29 |
|
30 |
Check the manpages for which of those options you want. |
31 |
ie, you might want to get rid of allow_other etc. |
32 |
|
33 |
|
34 |
-- |
35 |
Simon Thelen |