4

Here is my current setup:

I connect on a DSL line using SSH to a remote linux box with samba installed. I create a tunnel by forwarding port 139 on my local linux box. I then use smbmount to access files on the remote box.

Unfortunately the connection is sometimes slow and it makes software having opened files to hang. It is quite annoying.

I was wondering if there is a way to automatically cache files locally to avoid thoses hungs? It could be using smb, SSHFS or even NFS if one has a good setup for doing this. I just need to connect using SSH.

1 Answer 1

2

SSHFS has options for tweaking its caching - see its man page (there are options both for SSHFS and for FUSE). Another option is NFSv3 over SSH/VPN or NFSv4 which can provide encryption on its own.

However, if you are using the server mostly to have your data stored in a reliable location, you could keep the files locally as well and rsync (over ssh) from time to time (it uses a delta-transfer algorithm thus saving bandwidth). In other words create the cache yourself and flush it when necessary. You can put the local copy on an encrypted partition if security is concern and you have full rights to the workstation in question (also remember to encrypt the swap in that case).

2
  • Just switching to SSHFS provides a better usability on SMB over SSH. Having files locally and rsync them from time to time is also a good option if SSHFS is not enough. I just have to be careful as the files might be modified from different locations. Thanks for your help.
    – Ponytech
    Nov 3, 2012 at 15:24
  • 1
    @zepatou another alternative could be using a distributed version control system (git, mercurial, ...) - that could help with possible clashing updates from different machines (you could run it over ssh and with compression). However, it would only work reasonably for text files. On the other hand, you'd have a history to go back to if something went wrong.
    – peterph
    Nov 3, 2012 at 21:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .