I am trying to configure Mathematica to work through ssh, in order to use the 12 remote kernels I have on a remote Linux Machine running Mathematica 8.0.
I am trying to connect from a Mac OSX 10.9.4 machine with Mathematica 9.0.1.
I followed step by step the guide in the references (quite poor I have to admit) available here:
and the good thing is that at least Mathematica front end is asking me for the password, but after inserting it, i always get the error:
"The kernel LinuxKernel failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."
I tried to start the kernel through a Terminal session in ssh and it works just fine. But why I cannot start it from the FrontEnd?
I tried playing a bit with the settings in Mathematica but I didn't get far.
Does anybody have an idea on how to set up properly this thing? Or at least if it is possible to find a tutorial less useless (at least for me) than that one in the support page?
Thank you very much for your help.
The same problem with Mac OS X 10.10 machine with Mathematica 10 as client and Linux Debian with Mathematica 10.
When we have a solution?
Hi R lisboa,
the kernel works just fine, the problem is making it work through the front end.
In order to don't have to manually copy all my others nb in the server.
It is quite disappointing that in wolfram website there is not clear help about this problem.
There is a solution following the documents at:
In reference  there are two files: .nb and .zip. In the last there are the files:
tunnel.sh (linux and mac)
In reference  there is one file: *.doc that is a how-to.
Works ! I did (linux as remote and mac OS X as local machines).
a) I generated a public and private ssh key on my local machine (mac) without password. I copied the public key to the remote machine.
b) I copied the file init.m to the directory /home/Account/.Mathematica/Kernel/ directory on the remote machine. Where Account is your account in remote machine.
c) I copied the file tunnel.sh to the directory /Users/Account/Library/Mathematica/FrontEnd/ on the local machine. Where Account is your account.
d) I set the remote kernel on the local machine:
Evaluation / Kernel Configuration Options / Add
Kernel name: RemoteKernel
Basic Options: - check: Remote machine;
- Kernel program: the path of math in remote machine. (the mine is: Ex.: /home/opt/bin/math)
- Remote host: the address of remote machine (or ip): Ex.: remote.machine:port. where port is the ssh port to access the remote machine.
- Arguments to MLOpen:
-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract -LinkHost 127.0.0.1
"/Users/Account/Library/Mathematica/FrontEnd/tunnel.sh" firstname.lastname@example.org:port "/home/opt/bin/math" "linkname"
ATTENTION: linkname is between " " and " ` " that not appear above.
Replace above: * Account by your directory in local machine;
* user by login in remote machine;
* remote.machine by ip address of remote machine;
* port by ssh port of remote machine.
I seem to have the same problem with Mma 7.0, and tried all what was recommended here, and more, to no avail.
It used to work fine since years, but now after about 1 year of pause I noticed remote kernels "suddenly" don't work any more.
AFAIK I didn't change the Mma setup in the mean time.
Here are the data:
-Problem happens for Mma 7.0 but for MMa 11.0 all is fine!
-Problem happens for any pair of two out of 3 machines.
-Machines run macOS High Sierra, 10.13.3
-passwortless ssh works between all machines
-I can run remote kernels via ssh
-I tried various setups using mathssh, tunnel.sh
-The following errors appear immediately, so it seems likely that the error is with the frontend and not with the connection:
-setup using mathssh yields: "The kernel xxxxx failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."
-setup using tunnel.sh: yields panel with "Mathematica could not establish a connection to the kernel. Kernel: Local. Low-level MathLink error: Unknown internal error."
-I suspect it may have to do with Java, there were some other problems in the past with Java and Mma.