Re: OpenSSH mathlink remote kernel connection problem.
- To: mathgroup at smc.vnet.net
- Subject: [mg78025] Re: [mg77597] OpenSSH mathlink remote kernel connection problem.
- From: Steve Wilson <stevew at wolfram.com>
- Date: Thu, 21 Jun 2007 05:53:49 -0400 (EDT)
- References: <200706131143.HAA07211@smc.vnet.net>
You have touched on a process that is a little complicated. MathLink's TCPIP link protocol requires two open channels between the local machine and the remote machine. One channel functions as the primary data stream and the second channel functions as the urgent message channel. Without providing for both channels you will never get a connection to run correctly over ssh. Do the following: In a cygwin shell ssh to the remote machine (ie log in to the remote machine). Run the kernel as follows: math -mathlink -linkcreate -linkprotocol TCPIP The kernel will print out a linkname: port1@hostname,port2@hostname In a second cygwin shell, ssh to the remote machine as follows: ssh -C -g -L port1:hostname:port1 -L port2:hostname:port2 hostname In the Mathematica Front End, create a new Kernel configuration and use the following as arguments to MLOpen: -LinkMode Connect -LinkProtocol TCPIP -LinkName port1@localhost,port2@localhost Steve Wolfram Research Inc. On Jun 13, 2007, at 5:43 AM, anguzman at ing.uchile.cl wrote: > I\'ve installed in my winxp, Mathematica 5.2.0 and cygwin + OpenSSH > client (and server). I\'d like to stablish a mathlink connection to a > remote Kernel (Mathematica 5.0) on an external machine in a Linux net. > I can\'t access the external machine directly from my house (the > winxp) via ssh, but I created a SSH-tunnel from my local 11111 port to > the remote-machine by-passing the gate server. I also have dsa-key > pairs in the right places so I can connect to the Linux net directly > without writing a password. > Summarizing, I can: > -Execute from the command-prompt: > > "C:\\cygwin\\bin\\ssh.exe\" -p 11111 myusername@localhost math > > ..and work with mathematica 5.0 in the remote machine. (in the command > line, I don\'t worry about the Front End) > > But I can\'t: > -Start the remote Kernel from the front end in my winxp. > I\'ve created a Remote Machine Kernel and its \"Kernel Configuration > Options..." are: > > Arguments to MLOpen: > > -LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract > > And the \"Shell command to Launch Kernel\" > > "C:\\cygwin\\bin\\ssh.exe\" -p 11111 myusername@localhost \" math > -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName > `linkname` \" > > > After that, I try to execute a simple operation in the remote kernel > (say..2+2) and several things happen: > -The operation hangs > -My winxp , which uses core 2 duo, rise up at 50% in both processors > as I can see on the Task Manager, (in the MathKernel.exe process).. > -the following process starts in the remote machine: > /usr/local/Wolfram/Mathematica/5.0/SysytemFiles/Kernel/Binaries/ > Linux/MathKe= > rnel -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName > 2250 at 192.168.0.100,2251 at 192.168.0.100 > > After a few minutes, both processes stop, the notebook stops being > hanged > but I don't get to know how much 2+2 is... > > I suspect on the 192.168.0.100 . I use a router and this is my local > IP. Why does this number appear? Shouldn\'t be something related to my > \"real-IP\"? > > Thanks in advance for any comment-help.. > > Atte. Andres Guzman > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. >
- Follow-Ups:
- "Elastic string" (type of traveling-salesman) paradigm for sampling discrete data sets
- From: Curtis Osterhoudt <cfo@lanl.gov>
- "Elastic string" (type of traveling-salesman) paradigm for sampling discrete data sets
- References:
- OpenSSH mathlink remote kernel connection problem.
- From: anguzman@ing.uchile.cl
- OpenSSH mathlink remote kernel connection problem.