login as root
apt-get install sshfs
lsmod | grep fuse
if nothing is displayed add the kernel module
modprobe fuse
#check again for fuse
modprobe fuse
… after kernel module update reboot
after reboot check for module being loaded
Then mount path
sshfs USERNAME@HOSTNAME_OR_IP:/PATH LOCAL_MOUNT_POINT SSH_OPTIONS
sshfs sessy@mycomputer:/home/sessy /mnt/sessy -o reconnect -C -o workaround=all
Unmounting
To unmount the remote system:
$ fusermount -u LOCAL_MOUNT_POINT
Example:
$ fusermount -u /mnt/sessy
Chrooting
You may want to jail a (specific) user to a directory.To do this, edit /etc/ssh/sshd_config
:
/etc/ssh/sshd_config
..... Match User someuser ChrootDirectory /chroot/%u ForceCommand internal-sftp #to restrict the user to sftp only AllowTcpForwarding no X11Forwarding no .....