Auto-mounting sshfs from /etc/fstab
Elias Chrysocheris
elias_chr at otenet.gr
Wed Sep 5 22:03:43 UTC 2012
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 at 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
More information about the freebsd-questions
mailing list