This document describes how to install and use sshfs, a FUSE based filesystem that uses SSH to mount remote folders. Since it is based on FUSE (userspace filesystem framework for Linux) your kernel will need to have the fuse module available. FUSE is included in kernel newer than 2.6.14, so I will assume that you will have it already included in your kernel.
Fuse is included in the stock debian etch kernel (2.6.18) but if you install this on a older debian system you could easily use module-assistant to add FUSE support to your kernel:
1 2 3 4
The only thing left is to install sshfs. In debian etch this is as simple as:
This will install also the required dependencies: fuse-utils, libfuse2
Now, we should be able to use sshfs, and we can try to mount a remote server’s /data folder with:
(depending how you connect to the remote ssh server, this will ask you for a user or key password, etc.). You will need to have proper permissions. If you require you can also use -o idmap=user to translate the remote ssh user to the local user specified in the command.
If you get this error:
this means that even if your kernel uses udev to dynamically create devices, in this case it has not done that. The solution for this is to load first the fuse kernel module. This will take care and create the device /dev/fuse:
This will work until the first reboot, and if you want to make this change permanent you will have to add the fuse module to the automatically loaded module list. For ex. in debian you would add to your /etc/modules a line containing the word â€œfuseâ€.
Note: – you can unmount the remote folder using the regular umount command like:
1 2 3