From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] sshnet usage? From: "Russ Cox" MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Wed, 11 Dec 2002 10:49:41 -0500 Topicbox-Message-UUID: 30176ef8-eacb-11e9-9e20-41e7f4b1d025 > 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