Saturday, November 8, 2008

Install SSHFS (SSH filesystem) in ubuntu via command line

Install sshfs by doing:
$sudo apt-get install sshfs %This install sshfs and all dependents
$sudo mkdir /media/my-ssh-server-name
%This creates the folder to mount
$sudo chown your-username /media/dir-name %This gives you permissions
$sudo modprobe fuse %This loads the fuse module
$sudo adduser your-username fuse %This gives you permissions to run fuse

Now reboot your computer and use the command:
sshfs /media/my-ssh-server-name

For example, if I had a hosted account at, and my login name was JOEBOB and I had a website in a folder www/website2/ and a folder I made in /media called website2 I would do:
sshfs /media/website2

Now to unmount do:
$fusermount -u /media/my-ssh-server-name %Use this to unmount

No comments: