SSHFS can be used to mount directories from one server to another securely over the SSH protocol. This can be especially useful for our protected storage servers can is much better for sensitive data than NFS. This guide is for CentOS 6 x86_64 (64-bit).
Allow for fuse by logging into the VPSGrid control panel, selecting Filesystems and Enable FUSE.
Enable EPEL Repo
Install FUSE and SSHFS
Mount a remote directory to a local directory
sshfs email@example.com:/remotedir /mnt/sshfs
Replace /mnt/sshfs with the local directory you wish to use, and replace /remotedir with the directory on the remote server you wish.
Unmounting a FUSE mount
fusermount -u /mnt/path
ID Mapping and User Access
FUSE will by default mount the directory as root, disabling access to other users. To allow other users to access the mount, you can mount SSHFS with the ‘allow_user’ option:
sshfs -o allow_other firstname.lastname@example.org:/remotedir /mnt/sshfs
To map the mount to a specific user. You can mount with the idmap=user option. Note that the user must exist on both the remote and the local system.
sshfs -o idmap=user email@example.com:/home/admin /home/admin
If the user is different on the local system, you can specify the user. For example on the remote system, the user is admin and the local system, the user is admin2.
sshfs -o idmap=user,User=admin2 firstname.lastname@example.org:/home/admin /home/admin2