LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs > neonsignal
User Name
Password

Notices



Rate this Entry

mounting remote directory through ssh

Posted 11-03-2011 at 04:48 AM by neonsignal

The sshfs package can be used to fuse mount remote directories.

For example, a remote apt-get archive could be mounted as a rough way of sharing the package cache:
Code:
sshfs server:/var/cache/apt/archives /var/cache/apt/archives
And then unmounted later:
Code:
fusermount -u /var/cache/apt/archives
This method can be automated by setting up an entry in /etc/fstab (this works best if the ssh login is done through a PKI file rather than a password). I found I had to alias the mount.fuse:

Code:
ln -s /sbin/mount.fuse /sbin/mount.fuse.sshfs
A typical setup line in /etc/fstab will then look something like this:
Code:
server:/home/user /media/user fuser.sshfs user,noauto 0 0
Then mount can be used from the user account (or it can be set to auto mount):
Code:
mount /media/user
umount /media/user
Posted in Uncategorized
Views 265 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 02:25 AM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration