Sorry if this is posted twice, first time didn t do it This is now done in two patches posted at http://www.sagemath.org:9002/sage_trac/ticket/483 Paul
On Aug 20, 1:36 am, "William Stein" <[EMAIL PROTECTED]> wrote: > On 8/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > For the record... > > I have gotten around my difficulty thanks to the option "ProxyCommand" > > in ssh. I now have the following lines in my ~/.ssh/ssh_config > > Paul, > > It would be great if you could add this discussion (in latex-ish format) > to the file SAGE_ROOT/devel/sage/sage/interfaces/expect.py (and > post a patch). Then people reading the reference manual about the > interfaces could have a reasonable chance of doing what you did. > > -- William > > > > > > > Host remote_for_sage > > ProxyCommand ssh gateway nc -w 1 remote 22 > > > and that (along with all the passwordless authentication associated) > > does the trick. > > It essentially tells my ssh to create a new virtual host called > > "remote_for_sage", so that > > - "ssh remote_for_sage" will actually return a SSH connection to > > "remote", but through the machine "gateway" > > - "ssh -t remote_for_sage magma" will similarly run magma on > > "remote" through "gateway" > > - "ssh remote" is not affected at all (and in my case won't work, > > as "remote" is shielded by "gateway", that was the point) > > - "scp remote_for_sage" will *also* be tunneled through > > "gateway" (that's the power of ProxyCommand) > > > So when I do > > sage: magma = Magma(server = "remote_for_sage") > > , that ssh_config takes care of everything and the fact that it is > > tunneled through gateway is entirely transparent to sage. > > > Paul > > > On Aug 16, 9:26 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > > I will try, don't hold your breath. > > > Even without my additional problem of having to go through a gate, it > > > looks as if the scp file tranfers have only been implemented for > > > copies of sage (sage0.py, which is the only place scp appears), not > > > for a general expect interface (see line > > > eval_using_file_cutoff = 0 # don't allow this! > > > in expect.py) > > > In some sense that's enough in most cases (you can have a situation > > > where exact-same-version SAGE's do all the communicating, and each > > > runs different CAS on different machines), but there would be another > > > extra overhead and one can not always install sage on remote. > > > Paul > > > > On Aug 16, 3:20 am, "William Stein" <[EMAIL PROTECTED]> wrote: > > > > > On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > > good catch, you can debug remotely on my computer :) > > > > > yes, william, you are right: the small examples work but not the big > > > > > ones. i didn t anticipate that SAGE was using files behind the scenes > > > > > (i don't know anything about how that works). > > > > > in any case, the fact that sage uses scp is not really a problem. this > > > > > is another workaround: > > > > > ssh -t tunnel scp test_file remote:~/test_file > > > > > (after setting all the passwordless stuff) > > > > > so if that s all that s needed, maybe one could add to the server > > > > > option of the interface a prefix and a suffix to trail the scp command > > > > > with, and the same for the ssh (or rsh or whatever is used) > > > > > You could try implementing this. Take a look at > > > > SAGE_ROOT/devel/sage/sage/interfaces/expect.py > > > > and > > > > SAGE_ROOT/devel/sage/sage/interfaces/mathematica.py > > > > Do a text search for "scp" in there. Make changes and do > > > > "sage -br" to start SAGE with the changes in effect. > > > > > William > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---