The client interacts with the remote file system via SFTP.
SSHFS works on most UNIX and Linux systems. The current implimentation is based on
FUSE.
As it uses ssh it is more secure than samba.
To run sshfs you need to install
fuse as well. If you install SSHFS through a package manager it will install all dependancies.For example:
bash$ sudo pacman -S sshfs (Arch)bash$ sudo apt-get install sshfs (Debian and derivatives)Once installed, you can mount any location on a remote server that you have ssh access to.
You need to have made the mountpoint (The location the remote directory will be mounted) first:
bash$ mkdir /path/to/MOUNTPOINTYou may then mount the remote directory into the mountpoint. This is done by:
bash$ sshfs USERNAME@SERVER:LOCATION MOUNTPOINTThe mountpoint now appears to contain the contents of the mounted directory on the remote server.
You can now interact with the contents as if it was on the local machine but you will be using the permissions of the user you mounted it with.
For example:
bash$ mkdir /server1bash$ sshfs user@192.168.1.2:~/home/user/ /server1would be used to mount the directory /home/user on the remote server in directory /server1 on the local machine.
To unmount mounted directories simply use:
bash$ fusermount -u MOUNTPOINTIn my example this would be:
bash$ fusermount -u /server1