NFS over on-demand SSH tunnel ... how to?

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Darth Wong
Sith Lord
Sith Lord
Posts: 70028
Joined: 2002-07-03 12:25am
Location: Toronto, Canada
Contact:

NFS over on-demand SSH tunnel ... how to?

Post 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.
Image
"It's not evil for God to do it. Or for someone to do it at God's command."- Jonathan Boyd on baby-killing

"you guys are fascinated with the use of those "rules of logic" to the extent that you don't really want to discussus anything."- GC

"I do not believe Russian Roulette is a stupid act" - Embracer of Darkness

"Viagra commercials appear to save lives" - tharkûn on US health care.

http://www.stardestroyer.net/Mike/RantMode/Blurbs.html
User avatar
Alferd Packer
Sith Marauder
Posts: 3706
Joined: 2002-07-19 09:22pm
Location: Slumgullion Pass
Contact:

Re: NFS over on-demand SSH tunnel ... how to?

Post 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.
"There is a principle which is a bar against all information, which is proof against all arguments and which cannot fail to keep a man in everlasting ignorance--that principle is contempt prior to investigation." -Herbert Spencer

"Against stupidity the gods themselves contend in vain." - Schiller, Die Jungfrau von Orleans, III vi.
User avatar
Darth Wong
Sith Lord
Sith Lord
Posts: 70028
Joined: 2002-07-03 12:25am
Location: Toronto, Canada
Contact:

Re: NFS over on-demand SSH tunnel ... how to?

Post 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.
Image
"It's not evil for God to do it. Or for someone to do it at God's command."- Jonathan Boyd on baby-killing

"you guys are fascinated with the use of those "rules of logic" to the extent that you don't really want to discussus anything."- GC

"I do not believe Russian Roulette is a stupid act" - Embracer of Darkness

"Viagra commercials appear to save lives" - tharkûn on US health care.

http://www.stardestroyer.net/Mike/RantMode/Blurbs.html
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Re: NFS over on-demand SSH tunnel ... how to?

Post 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.

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Re: NFS over on-demand SSH tunnel ... how to?

Post by Pu-239 »

Any success?

ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer


George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
Post Reply