mounting remote directory through ssh
Posted 11-03-2011 at 03: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:
And then unmounted later:
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:
A typical setup line in /etc/fstab will then look something like this:
Then mount can be used from the user account (or it can be set to auto mount):
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
Code:
fusermount -u /var/cache/apt/archives
Code:
ln -s /sbin/mount.fuse /sbin/mount.fuse.sshfs
Code:
server:/home/user /media/user fuser.sshfs user,noauto 0 0
Code:
mount /media/user umount /media/user
Total Comments 0




