MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: WolframSSH vs mathssh and private key command line option

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64727] Re: [mg64602] WolframSSH vs mathssh and private key command line option
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Wed, 1 Mar 2006 04:11:45 -0500 (EST)
  • References: <200602230535.AAA13296@smc.vnet.net> <4404E9FB.2070009@wolfram.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Thank you Arnoud Buzing.

I eventually made my remote kernel work by guessing where to put my
OpenSSH format rsa private key after seeing where WolframSSH put the
host public key.

For others searching Mathgroup in the future:

On the Windows machine with the front end, the OpenSSH format public
key of the machine that hosts the remote kernel goes in this file:

C:\Documents and Settings\your user name here\.ssh\known_hosts

On the Windows machine with the front end, the user's OpenSSH format
rsa private key of the machine that hosts the remote kernel goes in
this file (if it is a different key type, the file name will be
different):

C:\Documents and Settings\your user name here\.ssh\id_rsa

One more thing that might help: The default Linux install for
Mathematica (for my system) doesn't add the Mathematica shell scripts
to the default path. To work around this, I changed my kernel command
to: /usr/local/bin/math

There is a definite lack of error messages and trouble shooting
documentation for incorrectly configured remote kernels. The lack of
documentation is likely reasonable, given how few Mathematica users
probably attempt to configure remote kernels. I feel that Mathematica
should have at least some error messages indicating that a kernel
wasn't able to be launched (or ssh wasn't able to connect or
whatever).

At present, if the remote kernel doesn't launch, output cells just
don't appear - assuming the local copy of the kernel doesn't launch,
as it sometimes does. If the local kernel launches, output will
appear, but it won't be from the "correct" kernel.

On 2/28/06, Arnoud Buzing <arnoudb at wolfram.com> wrote:
> Chris Chiasson wrote:
> > Dear MathGroup,
> >
> > In trying to set up a remote kernel connection to a linux machine, I am
> > wondering the following about the Kernel configuration dialog box.
> >
> > It uses java -jar mathssh, but mathssh doesn't exist in my Mathematica
> > installation directory. I do have C:\Program Files\Wolfram
> > Research\Mathematica\5.2\SystemFiles\Java\WolframSSH.jar
> >
> > Why is it trying to use a program that doesn't exist?
>
> Chris,
>
> It actually uses `java` -jar `mathssh` ...
>
> The `java` and `mathssh` are replaced by the frontend with the appropriate
> values for your machine. Other special `` variables used by the frontend
> are `username`, `linkname` and `ipaddress`. They are also replaced by the
> frontend at the time the link to the kernel is made.
>
> You can set up remote kernels in two ways, via the frontend and via the
> kernel. To set up remote kernels via the kernel, you need to set/change
> the EvaluatorNames option for the $FrontEnd object. First personalize
> these two variables:
>
> remote="machine.domain.com";
> kernel="/your/path/to/math";
>
> Then evaluate:
>
> SetOptions[
>   $FrontEnd,
>   EvaluatorNames->{
>    "Local"->{},
>    "Remote"->{
>     "MLOpenArguments"->
>      "-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract",
>     "LoginScript"->
>      "\"`java`\" -jar \"`mathssh`\""<>
>      " `username`@"<>remote<>
>      " "<>kernel<>
>      " -mathlink"<>
>      " -LinkMode Connect"<>
>      " -LinkProtocol TCPIP"<>
>      " -LinkName \"`linkname`\""<>
>      " -LinkHost `ipaddress`"
>    }
>   }
> ]
>
> Then test by creating a notebook using the new 'Remote' kernel:
>
> NotebookCreate[Evaluator->"Remote"]
>
> In the new notebook evaluate: $MachineName
>
> You may see an SSH dialog come up to confirm if you want to connect.
> Click Yes if you want to connect.
>
> After a few moments the name of the remote machine should appear for Out[1].
>
> If your Windows user name and UNIX user name do not match, you may want
> to explicitly replace `username` in the above code with your actual UNIX username.
>
> Note that, unless you are setting up many remote kernels programmatically, it is
> easier to just use the Kernel -> Kernel Configuration Options ... dialog.
>
> First click the 'Add' button, the check the 'Remote Machine' radio button under
> the basic options and fill out the user name, remote machine name and the full
> path to the kernel on the remote machine. Then click OK (twice) and test it by
> setting the notebook's kernel to the 'New Kernel'.
>
> ---
> Arnoud
>
>
>
>
>
>
>


--
http://chris.chiasson.name/


  • Prev by Date: Re: WolframSSH vs mathssh and private key command line option
  • Next by Date: Re: Strange problem with InverseSeries
  • Previous by thread: Re: WolframSSH vs mathssh and private key command line option
  • Next by thread: Re: Strange problem with InverseSeries