Mount a remote share using SSHFS

2011-01-05 by xpheas
Install SSHFS on you local machine:
BASH-Code:
1
apt-get install sshfs

Add your user to the fuse group
BASH-Code:
1
sudo gpasswd -a $USER fuse

Create the mount point
BASH-Code:
1
mkdir ~/remote_share

Now we can mount the remote share
BASH-Code:
1
sshfs -o idmap=user $USER@host:/path/to/share ~/remote_share

To unmount type:
BASH-Code:
1
fusermount -u ~/remote_share

To add the share permanetly add it to your fstab
BASH-Code:
1
nano /etc/fstab

BASH-Code:
1
sshfs#$USER@host:/path/to/share /home/$USER/remote_share fuse users,exec,allow_other,_netdev,reconnect,transform_symlinks,uid=1000,gid=1000,defaults,idmap=user 0 0

For passwordless authentication put your public rsa key on the remote machine.

  « back

Feel Free to Leave a Comment

Name:*


Email: (not visible)


Website:


Comment:*