Re: Auto-mounting sshfs from /etc/fstab

2012-09-06 Thread OriS
Hello,

Well, no I haven't -- I have tried only the fstab route which does serve
the purpose for me.

Thanks nonetheless :)

OriS

On Wednesday, September 5, 2012, andrew clarke wrote:

 On Wed 2012-09-05 19:38:54 UTC+0200, OriS (
 site.free...@orientalsensation.com javascript:;) wrote:

  I've been trying to find a page on the Internet where an example is
 posted
  explaining how to mount sshfs from /etc/fstab, but I can't find any!

 Have you tried running sshfs from cron?  eg. run crontab -e as a
 regular user and add:

 @reboot  /usr/local/bin/sshfs remotehost: $HOME/mnt/remote

 Note: Untested.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Auto-mounting sshfs from /etc/fstab

2012-09-05 Thread OriS
Hello all,

I've been trying to find a page on the Internet where an example is posted
explaining how to mount sshfs from /etc/fstab, but I can't find any!

I'm on 9.1-PR amd64 and I've installed Fuse and sshfs, I have enabled Fuse
in rc.conf and I can see /dev/fuse. Furthermore, using sshfs from the
command line, I am even able to mount the remote file system.

I can manually mount the remote file system using:

*sshfs user@host:/ /mnt*

Then, I do 'mount -p' and get:

*/dev/fuse0  /mnt  fusefs.sshfs  rw,sync  0  0*

This isn't sufficient for mounting/unmounting from fstab since it's missing
the authentication details I've used in sshfs.

So.. the question is: How to add the authentication details to /etc/fstab
so that I can mount the sshfs just by using:

*mount /mnt*

Thanks in advance, and kindly Cc me on your replies!

/OriS
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Auto-mounting sshfs from /etc/fstab

2012-09-05 Thread andrew clarke
On Wed 2012-09-05 19:38:54 UTC+0200, OriS (site.free...@orientalsensation.com) 
wrote:

 I've been trying to find a page on the Internet where an example is posted
 explaining how to mount sshfs from /etc/fstab, but I can't find any!

Have you tried running sshfs from cron?  eg. run crontab -e as a
regular user and add:

@reboot  /usr/local/bin/sshfs remotehost: $HOME/mnt/remote

Note: Untested.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Auto-mounting sshfs from /etc/fstab

2012-09-05 Thread Polytropon
On Thu, 6 Sep 2012 07:43:38 +1000, andrew clarke wrote:
 On Wed 2012-09-05 19:38:54 UTC+0200, OriS 
 (site.free...@orientalsensation.com) wrote:
 
  I've been trying to find a page on the Internet where an example is posted
  explaining how to mount sshfs from /etc/fstab, but I can't find any!
 
 Have you tried running sshfs from cron?  eg. run crontab -e as a
 regular user and add:
 
 @reboot  /usr/local/bin/sshfs remotehost: $HOME/mnt/remote
 
 Note: Untested.

Also untested, but possible, if you want it to happen
system-wide: Add a section to /etc/rc.local:

echo -n  sshfs
/usr/local/bin/sshfs your parameters

And to /etc/rc.shutdown.local:

echo -n  sshfs
umount where it was mounted to

Note that you can add additional configuration tweaks by
using the rc.conf mechanism, and you can also add tests
to increase reliability.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Auto-mounting sshfs from /etc/fstab

2012-09-05 Thread Elias Chrysocheris
In the past I wanted to do so in my system. I had one server called pluto and 
I wanted to sshfs one directory from my laptop. The 
first thing I had to do was to make passwordless ssh from my laptop to the 
server (there are a lot of pages in the internet to explain 
how to do this, so I will not explain how-to...)

When passwordless ssh login is possible then a line in your fstab like the 
following does the job:

sshfs#your_username_here@pluto:/Common/   
/Network_Folders/Pluto/ fuse
BatchMode=yes,reconnect,allow_other,users,gid=users,umask=002  0 0

In this way the system automounts the directory /Common that exists in pluto 
in my local directory /Network_Folders/Pluto
Of cource pluto must have a specific ip (or available through naming service 
e.t.c.). In my case it has a static IP so I had its 
declaration in /etc/hosts

Hope this helped you

Elias
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org