public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] How to automate an sshfs (fusermount) mounted share
@ 2015-01-03 14:23 Harry Putnam
  2015-01-03 15:42 ` Andrew Savchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Harry Putnam @ 2015-01-03 14:23 UTC (permalink / raw
  To: gentoo-user

I'm sshfs mounting an solaris zfs file system in the interactive
fashion.

sshfs $USR@HOST:/file/system MOUNTPOINT
 passwd?
 enter passwd <RETURN>
 
Once mounted I run an rsnapshot backup onto the mounted FS.

Any ideas on how to go about doing this mount automatically (scripted)
will be greatly appreciated.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] How to automate an sshfs (fusermount) mounted share
  2015-01-03 14:23 [gentoo-user] How to automate an sshfs (fusermount) mounted share Harry Putnam
@ 2015-01-03 15:42 ` Andrew Savchenko
  2015-01-03 15:49   ` Simon Thelen
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Savchenko @ 2015-01-03 15:42 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

Hi,

On Sat, 03 Jan 2015 09:23:29 -0500 Harry Putnam wrote:
> I'm sshfs mounting an solaris zfs file system in the interactive
> fashion.
> 
> sshfs $USR@HOST:/file/system MOUNTPOINT
>  passwd?
>  enter passwd <RETURN>
>  
> Once mounted I run an rsnapshot backup onto the mounted FS.
> 
> Any ideas on how to go about doing this mount automatically (scripted)
> will be greatly appreciated.

1) Set up your ssh to use keys. Key itself should not be protected
by password (or manual intervention will be needed on each mount).

2) Add sshfs command to your .bash_profile (or whatever login shell
you're using) with check that filesystem is not mounted already,
something like:
  grep -q $MOUNTPOINT || sshfs $USR@HOST:/file/system MOUNTPOINT

Alternatively you may add this to your DE/WM autostart scripts, if
you are using GUI logins only.

Best regards,
Andrew Savchenko

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] How to automate an sshfs (fusermount) mounted share
  2015-01-03 15:42 ` Andrew Savchenko
@ 2015-01-03 15:49   ` Simon Thelen
  2015-01-04  2:32     ` Adam Carter
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Thelen @ 2015-01-03 15:49 UTC (permalink / raw
  To: gentoo-user

On 15-01-03 at 18:42, Andrew Savchenko wrote:
> Hi,
> 
> On Sat, 03 Jan 2015 09:23:29 -0500 Harry Putnam wrote:
> > I'm sshfs mounting an solaris zfs file system in the interactive
> > fashion.
> > 
> > sshfs $USR@HOST:/file/system MOUNTPOINT
> >  passwd?
> >  enter passwd <RETURN>
> >  
> > Once mounted I run an rsnapshot backup onto the mounted FS.
> > 
> > Any ideas on how to go about doing this mount automatically (scripted)
> > will be greatly appreciated.
> 
> 1) Set up your ssh to use keys. Key itself should not be protected
> by password (or manual intervention will be needed on each mount).
> 
> 2) Add sshfs command to your .bash_profile (or whatever login shell
> you're using) with check that filesystem is not mounted already,
> something like:
>   grep -q $MOUNTPOINT || sshfs $USR@HOST:/file/system MOUNTPOINT
> 
> Alternatively you may add this to your DE/WM autostart scripts, if
> you are using GUI logins only.
Or just add it to /etc/fstab:
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

Check the manpages for which of those options you want.
ie, you might want to get rid of allow_other etc.


-- 
Simon Thelen


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-user] How to automate an sshfs (fusermount) mounted share
  2015-01-03 15:49   ` Simon Thelen
@ 2015-01-04  2:32     ` Adam Carter
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Carter @ 2015-01-04  2:32 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 154 bytes --]

Iirc you may need to initiate a single regular ssh connection so you can
accept the servers key and have it added to the clients known hosts file,
first.

[-- Attachment #2: Type: text/html, Size: 154 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-04  2:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-03 14:23 [gentoo-user] How to automate an sshfs (fusermount) mounted share Harry Putnam
2015-01-03 15:42 ` Andrew Savchenko
2015-01-03 15:49   ` Simon Thelen
2015-01-04  2:32     ` Adam Carter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox