Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
This is related. –  rcollyer Feb 28 '13 at 16:11
add comment

1 Answer

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 31415@10.8.0.14,31416@10.8.0.14 -LinkOptions MLDontInteract

Replace 10.8.0.14 with the IP address of your client

Then as Launch Command use:

ssh -R 31415:10.8.0.14:31415 -R 31416:10.8.0.14:31416 user@10.8.0.1 "dbus-launch --exit-with-session /usr/local/bin/math -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName 31415@10.8.0.14,31416@10.8.0.14 -LinkHost 10.8.0.14"

and replace 10.8.0.14 with your host address and 10.8.0.1 with your server address

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

Cheers

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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