9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] sshnet usage?
@ 2002-12-11 15:49 Russ Cox
  2002-12-11 16:56 ` Jeff Sickel
  0 siblings, 1 reply; 5+ messages in thread
From: Russ Cox @ 2002-12-11 15:49 UTC (permalink / raw)
  To: 9fans

> I can currently reach another network via two ssh hops.  Meaning
> that any files I need transfered between the machines on either
> end of the connections currently have to be transfered by making
> two scp hops.  This is a problem as the middle machine doesn't have
> much disk space.  So ideally I would like to run u9fs at one endpoint
> and sshnet behave as the tunnel.
>
> Am I just incorrect in my interpretation of the man page?

No, I was just confused about how transparent you
wanted the tunnel to be.  As long as you only need the
tunnel to be one way, this is easy.

Basically, if you do

	sshnet hop1
	mntgen
	srvssh hop2

(assuming u9fs is in your path on hop2),
that posts the u9fs service in /srv/hop2,
so that then running

	mntgen
	9fs hop2

in any other window (even without the sshnet)
will mount /n/hop2.

(You could just create /n/hop2, or put mntgen
in your profile.)

If you want more than just ssh access to the
network, you could adapt the following:

	g% cat /usr/rsc/bin/rc/mit
	#!/bin/rc

	if(test -d /net/mit){
		echo 'already have /net/mit' >[1=2]
		exit recursion
	}

	if(test -f /srv/mit)
		mount /srv/mit /net.mit
	if not
		sshnet -m /net.mit -s mit ny.lcs.mit.edu

	if(! test -d /net.mit/tcp){
		echo 'no /net.mit/tcp' >[1=2]
		exit network
	}

	aux/stub -d /net/mit
	bind /net.mit/tcp /net/mit
	g%

This is like just running sshnet, but you end up
being able to decide, on a per-call basis, which
network gets used: addresses like wherever or
tcp!wherever still go out on the local network,
while addresses like mit!wherever go out over
the sshnet tunnel.

If you are using mntgen you could change the
/net.mit's to /n/net.mit to avoid creating another
directory in the root.

Russ



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] sshnet usage?
  2002-12-11 15:49 [9fans] sshnet usage? Russ Cox
@ 2002-12-11 16:56 ` Jeff Sickel
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Sickel @ 2002-12-11 16:56 UTC (permalink / raw)
  To: 9fans

Russ Cox <rsc@plan9.bell-labs.com> wrote:
> No, I was just confused about how transparent you
> wanted the tunnel to be.  As long as you only need the
> tunnel to be one way, this is easy.

> Basically, if you do

> 	sshnet hop1
> 	mntgen
> 	srvssh hop2

> (assuming u9fs is in your path on hop2),
> that posts the u9fs service in /srv/hop2,
> so that then running

> 	mntgen
> 	9fs hop2

Thanks.
This is exactly what I was wanting to do.  So much more to learn...

Jeff


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] sshnet usage?
  2002-12-11 14:00 Russ Cox
@ 2002-12-11 14:47 ` Jeff Sickel
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Sickel @ 2002-12-11 14:47 UTC (permalink / raw)
  To: 9fans

>> Is there a way to use sshnet as a tunel between two networks?

> How exactly do you want this tunnel to behave?

I can currently reach another network via two ssh hops.  Meaning
that any files I need transfered between the machines on either
end of the connections currently have to be transfered by making
two scp hops.  This is a problem as the middle machine doesn't have
much disk space.  So ideally I would like to run u9fs at one endpoint
and sshnet behave as the tunnel.

Am I just incorrect in my interpretation of the man page?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] sshnet usage?
@ 2002-12-11 14:00 Russ Cox
  2002-12-11 14:47 ` Jeff Sickel
  0 siblings, 1 reply; 5+ messages in thread
From: Russ Cox @ 2002-12-11 14:00 UTC (permalink / raw)
  To: 9fans

> Is there a way to use sshnet as a tunel between two networks?

How exactly do you want this tunnel to behave?



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9fans] sshnet usage?
@ 2002-12-11  9:52 Jeff Sickel
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Sickel @ 2002-12-11  9:52 UTC (permalink / raw)
  To: 9fans

Is there a way to use sshnet as a tunel between two networks?

My understanding from the man page is that it can forward packets
but all I've been able to do is establish a connection with one
machine.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-12-11 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11 15:49 [9fans] sshnet usage? Russ Cox
2002-12-11 16:56 ` Jeff Sickel
  -- strict thread matches above, loose matches on Subject: below --
2002-12-11 14:00 Russ Cox
2002-12-11 14:47 ` Jeff Sickel
2002-12-11  9:52 Jeff Sickel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).