search | index | tags | login/register

sshfs usage (by damian)

= mount a remote ssh filesystem using sshfs =

Package: sshfs
Description: filesystem client based on SSH File Transfer Protocol
sshfs is a filesystem client based on the SSH File Transfer Protocol.
Since most SSH servers already support this protocol it is very easy
to set up: i.e. on the server side there's nothing to do. On the
client side mounting the filesystem is as easy as logging into the
server with ssh.

Install ''sshfs'' using apt-get (''fuse-utils'' and ''libfuse2'', which are required):
apt-get -y install sshfs

Now, let us create a local directory where you want the files mounted. You should create the directory and make the user the owner of the directory:
mkdir ''/media/dir-name''
chown '''' /media/dir-name

Ok, let's have a look to the ''mount command'':
sshfs user@example.com:/remote/path /media/dir-name

Since ''sshfs'' is FUSE ('''F'''ilesystem in '''USE'''rspace), make sure the user requiring ''sshfs'' is a member of the group ''fuse'':
addgroup '''' fuse

(For security reasons, the ''/usr/bin/fusermount'' binary is installed in such a way that users cannot execute it. You will have to log out and log in again, to add yourself to the group ''fuse''.)

== fusermount: fuse device not found ==
try to fix with
modprobe fuse

you may add this permanently to ''/etc/modules'' by typing
echo fuse >> /etc/modules

== unmounting sshfs ==
To unmount the directory once your work is done, use the command:
fusermount -u ''/mount/path''

Tags:
#access #doc #file #filesystem #howto #linux #man #mount #remote #ssh #sshfs #transfer

Info:
Attribute(s): Public
Created: 02.02.2012 11:51   Total Views: 339
Last Changed: 05.04.2013 12:53   Total Changes: 1
Δt = 0.062881946563721s