Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old October 12th, 2006   #1
crazymonkey
Just Give Me the Beans!
 
Join Date: Jul 2006
Location: Montréal, Québec, Canada
Beans: 56
Ubuntu 6.06
HOWTO: sshfs (mounting remote directories trough ssh)

sshfs is a good way to easily mount folders from a remote host that you can access trough ssh. This tutorial assumes that you have openssh installed on the server. (Easy way: sudo apt-get install openssh-server)

On the client you will have to install sshfs and its dependencies (fuse-utils and libfuse2)
Code:
sudo apt-get install sshfs
Now load the fuse module :
Code:
sudo modprobe fuse
Create the directory where the share is to be mounted :
Code:
mkdir /home/user/local/mountpoint
*Of course change the path to fit your needs

You are now ready to mount the share :
Code:
sudo sshfs username@IPorHOSTNAME:/remote/folder/to/mount /home/user/local/mountpoint
Ex: sshfs bobbrown@bobserver.net:/home/bob /mnt/bobshome
Now you can use the remote directory as if it was local!

If you get an error saying :
Quote:
fusermount: failed to open /dev/fuse: permission denied
adding your user to the fuse group should solve the issue.

Code:
sudo addgroup yourusername fuse
Additional recommended step
These steps are not required to make sshfs work but are recommended if you plan on using sshfs alot and will save you some time.

Add the fuse module to /etc/modules
Code:
sudo gedit /etc/modules
add fuse at the bottom of the list, this will load the fuse module each time you boot.

Change permissions of fusermount
Code:
sudo chmod +x /usr/bin/fusermount
Once this is done you wont need to use sudo to mount directories using sshfs.

There is also the possibility to mount the share when you boot using /etc/fstab but I'm not sure how to do it yet.
__________________
Registered Ubuntu user #8233
crazymonkey is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:04 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry