I was trying to set up a remote kernel using Mathematica 8, a Debian server and a Mac OSX 10.8 client.

First I configured a VPN connection between server and client and went through all the basic steps of the remote kernel setup (registration of SSH keys etc.).

However, every time Mathematica tried to connect to the remote kernel, I was asked for the passphrase 5 times and then the connection failed to be established. Connecting directly from the terminal worked just fine, so the passphrase was definitely correct. The auth.log on the server side told me the key was accepted, but the connection was closed by the client shortly after.

I then tried to connect calling the Mathematica SSH implementation directly from the terminal. I was asked for server, username, keyfiles and passphrase however no matter what I typed in there, the error was exactly the same even if I used just made up stuff - exception handling and logging does not seem to be the favorite thing of the Wolfram engineers.

Changing to the default SSH implementation in launch command didn't change things either.


1 Answer 1


So here is the final solution i figured out after a while:

Open up the kernel configuration menu, Select Advanced Options and use the following for "Arguments to MLOpen":

-LinkMode Listen -LinkProtocol TCPIP -LinkName [email protected],[email protected] -LinkOptions MLDontInteract

Replace with the IP address of your client

Then as Launch Command use:

ssh -R 31415: -R 31416: [email protected] "dbus-launch --exit-with-session /usr/local/bin/math -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName [email protected],[email protected] -LinkHost"

and replace with your host address and with your server address

Hope this saves someone some time :) You can read about the used options in the Mathematica and SSH documentations.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.