The idea of sshfs was taken from the SSHFS filesystem distributed with LUFS, which I found very useful. There were some limitations of that codebase, so I rewrote it. Features of this implementation are: * Based on FUSE (the best userspace filesystem framework for linux ;-) * Multithreading: more than one request can be on it's way to the server * Allowing large reads (max 64k) * Caching directory contents This install will explain how to install and mount sshfs. It will give examples of how to mount on boot using the /etc/fstab
Applicable to Fedora Versions
- Fedora Core 7+
- You must have Fedora Extra's as a repository
- You must have a ssh server to test this on
Doing the Work
- You will need to install sshfs:
- The user needs to be added to group fuse: (Only required for old versions. New versions no longer use this group.)
- How to mount it (Remeber to change it to your specific settings):
- To unmount:
su -c 'yum install fuse-sshfs'
su -c 'gpasswd -a yourusername fuse'
sshfs email@example.com: yourmountpoint/
fusermount -u yourmountpoint/
The next bits are your choice and are not required for SSHFS to function
- We will set it up so that it automatically mounts on boot using fstab:
- You will need to add this line:
su -c 'gedit /etc/fstab'
firstname.lastname@example.org:/remote/directory/to/load /home/youmountpoint/ fuse comment=sshfs,noauto,users,exec,uid=1000,gid=1000,allow_other,reconnect,transform_symlinks,BatchMode=yes
How to test
- If you get a fusermount denied error you may need to set sshfs to SUID:
- You may get issues with SELinux you can either disable it or set it to permissive:
su -c 'chmod u+s /usr/bin/sshfs'
su -c 'gedit /etc/selinux/config'Then Change it to the following:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
# SETLOCALDEFS= Check local definition changes
Common problems and fixes
We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net