Tell me more ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have a problem concerning the connection to a remote kernel via ssh on a vpn. I found a working configuration in this question:

Connection to remote kernel can not be established - No specific error shown

However, I use Windows 7 as my client and therefore cannot run the same command as the kind sir there provided in his answer:

ssh -R 31415:10.8.0.6:31415 -R 31416:10.8.0.6:31416 user@10.8.0.1 "dbus-launch --exit-with-session /usr/local/bin/math -mathlink -LinkMode Connect ..." because Windows does not have openssh built in but instead adapted that command to use the installed openSSH version of cygwin:

C:\Users\<username>\bin\bash --login -i -c "ssh -v -i /cygdrive/c/Users/<username>/Path/to/private/key user@10.8.0.1 /usr/local/bin/math -mathlink -LinkMode Connect ..."

This command DOES work if I run it directly in the windows console, the connection with the private key gets established, but when I try this same command in the remote kernel configuration the error in the title occurs without more specific troubleshooting help. Also the other question dealing with that error I could find had passphrase/private key problems and couldn't even connect via the console.

Upon inspecting the differences of the openssh version I noticed my client in cygwin uses 6.1p1 while the server uses 5.5p1. I tried installing a current openssh version on the Debian 6.0 server but the last officially supported and maintained one for that OS version is 5.5p1 and it doesn't seem such a good idea to me to upgrade to a not officially supported version. When trying to install an older version in cygwin, I cannot even select an older openssh version when running the cygwin setup again and selecting a cygwin packages mirror. So I searched for ~10 alternative mirrors that provide older openssh packages, but they all seem to lack a "setup.ini" file so no connection could be established.

I ask for help here because this seems to be a Mathematica specific problem, not a ssh related one..other clients with Mac OS X 10.8 can connect to the server using the same private key fine..

Does anyone have a similar setup and could give me a hint what might cause the error? Is there something I did not see in the remote kernel configuration? I use Mathematica 8.0.4, Windows 7 64bit client with openssh-6.1p1, Debian 6.0 server with openssh-5.5p1, cygwin 1.7.17.

Thank you!

Update: In the meantime I found someone with nearly the same problem, however 3 years ago and with no answer (i hope you don't mind links to other platforms: https://groups.google.com/forum/#!topic/comp.soft-sys.math.mathematica/K-Z3xbQNzbY

share|improve this question
Entering things into that "custom launch command" box seems to be a bit unreliable in my experience. You might instead try assigning your launch command (as a string) to the variable SubKernels`RemoteKernels`$RemoteCommand--then you just need to tick the box when adding a kernel to have this remembered. – Oleksandr R. Mar 14 at 4:45
thanks Oleksandr R. , I tried your suggestion, I typed this command SubKernelsRemoteKernels`$RemoteCommand = "C:\Users\<user>\bin\bash--login-i-c \"ssh -v -i \ /cygdrive/c/Users/<user>/path/to/key user@10.8.0.1 /usr/local/bin/math -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName linkname -LinkHost 10.8.0.6\""` into an empty notebook and run it, just to test the connection, however, still no success, the same error persists..do you have any other suggestions? – hajn Mar 16 at 23:33
Don't forget that \ also needs to be escaped (as \\) in strings. Other than that, I'm not quite sure--I don't have this same configuration, so unfortunately I can't tell you what's likely to work. If you still have trouble, perhaps you might like to try using ssh port forwarding to set up the connection ahead of time? – Oleksandr R. Mar 17 at 5:43
oh, of course, I escaped it correctly, just copied it from somewhere else unescaped..unfortunately ssh portforwading also did not do the trick..if you happen to have any more hints I would be glad to try them, thanks for your effort – hajn Mar 18 at 21:21

1 Answer

up vote 1 down vote accepted

This is not the desired solution, but it is what I ended up doing: I finally gave up on trying to access a remote math kernel under Windows 7 and used a Ubuntu 12.04 image in VMWare which worked as expected.

Since the guy in the last link, who had the same problem 2 years ago, also couldn't make it work and eventually gave up I assume it's some kind of error in the Windows-Package of Mathematica or Windows itself. I can't believe though there are no users who found out how to run it..

Should somebody be able to provide a real solution to that problem I will remove that answer..

share|improve this answer

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.