Re: WolframSSH vs mathssh and private key command line option
- To: mathgroup at smc.vnet.net
- Subject: [mg64726] Re: [mg64602] WolframSSH vs mathssh and private key command line option
- From: Arnoud Buzing <arnoudb at wolfram.com>
- Date: Wed, 1 Mar 2006 04:11:45 -0500 (EST)
- References: <200602230535.AAA13296@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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