Page 1 of 1
NFS over on-demand SSH tunnel ... how to?
Posted: 2009-03-16 02:11pm
by Darth Wong
Does anyone know how to do this? I can use autofs to create an on-demand NFS mount over SSH, but that doesn't make the SSH tunnel itself start on demand, and I can't keep it reliably running 24/7.
Re: NFS over on-demand SSH tunnel ... how to?
Posted: 2009-03-16 04:48pm
by Alferd Packer
In solving a somewhat similar problem, I used rsync, which allows you to supply at private key file for authorization. If you don't passphrase the private key, you can establish SSH tunnels without user interaction, maybe by utilizing a dummy account.
You might be able to adapt the solution found here:
HOWTO
Looks like you can specify a key file, so that might work for you.
Re: NFS over on-demand SSH tunnel ... how to?
Posted: 2009-03-16 05:22pm
by Darth Wong
I have authorized key files already set up. But I need the SSH tunnel to automatically start up when I go to the target directory.
Re: NFS over on-demand SSH tunnel ... how to?
Posted: 2009-03-16 09:15pm
by Pu-239
Look up "executable map". Basically write script, which in your case should check if a tunnel is established, and if not, starts up SSH and spits out the location to mount on stdout given the mountpoint as a parameter.
Re: NFS over on-demand SSH tunnel ... how to?
Posted: 2009-03-18 02:40pm
by Pu-239
Any success?