SSHfs: mounting remote filesystem over ssh?
What is sshfs ?
SSHFS is a filesystem client based on the SSH File Transfer Protocol. It uses the the Filesystem in userspace (FUSE) framework by Miklos Szeredi.
Advantages of SSHFS
While sshfs may not be as fast and featureful as other full-blown network filesystems such as NFS or Samba, it still has some great features:
1. Very easy to use, 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
2. Provides secure (encrypted) access to remote files
3. Has decent performance (multithreaded, caching directory contents and allowing large reads)
4. Should work well even over slow and/or unstable links (think dialup), knows how to reconnect to the server when the connection is broken
Requirements
Fuse Kernel module must be installed and loaded before using sshfs.
Packages Required
1. Kernel Source ( for the current running kernel )
2. FUSE : http://jaist.dl.sourceforge.net/sourceforge/fuse/fuse-2.5.3.tar.gz
3. SSHFS-FUSE : http://jaist.dl.sourceforge.net/sourceforge/fuse/sshfs-fuse-1.6.tar.gz
4. OpenSSH client
Installing and configuring SSHFS
Installing FUSE
1. Download the FUSE kernel module source from http://jaist.dl.sourceforge.net/sourceforge/fuse/fuse-2.5.3.tar.gz
#wget http://jaist.dl.sourceforge.net/sourceforge/fuse/fuse-2.5.3.tar.gz
2. Go to your kernel source directory and prepare it if it is a fresh kernel source
#make menuconfig
3. Untar the FUSE package and change directory to the source directory of FUSE
#cd fuse-2.5.3
4. Configure the Fuse source package .
5. Build the fuse module and install it
#make install
6. Load Fuse module into kernel
Installing SSHFS
1. Download the sshfs-fuse package from http://jaist.dl.sourceforge.net/sourceforge/fuse/sshfs-fuse-1.6.tar.gz
2. Untar the source package and change directory to sshfs-fuse source directory
#cd sshfs-fuse-1.6
3. Build and install the sshfs
#make
#make install
Using SSHFS
You can mount a remote directory using the command sshfs @host: eg:
If the sshd on remote server is listening on an alternateport, you can use -oport= eg: For sshd listening on 2222
To unmount the filesystem, you can use fusermount -u eg:
Leave a Reply
You must be logged in to post a comment.