22
$\begingroup$

I have Mathematica 10.2 installed on an Ubuntu 14 machine in Amazon web services's elastic computer cloud. I have dido access and I'm connected to the instance though ssh on the terminal.

I have an empty Mathematica 10.2 notebook (running locally on OS X Yosemite 10.10.3) and I would like set the local notebook to use a remote kernel.

Remote connection info: - Username: ubuntu - Hostname: xxxxxxxxx - Password: /my/local/path/to/key.pem - Mathematica path: set to installation defaults (/usr/local/bin)

I've been stuck on this for days, and have read every SE post relating to remote configurations! I can't figure out how to properly launch the remote kernel and then connect my local front-end to a that remote kernel

Note: I have yet to find any documentation relating to remote kernels whose machine are accessed with PEM keyfiles.

$\endgroup$
8
  • $\begingroup$ Have you tried using ssh directly? $\endgroup$
    – rcollyer
    Commented Jul 22, 2015 at 17:06
  • $\begingroup$ @rcollyer Thanks, yes I tried that answer to no avail. $\endgroup$
    – M.R.
    Commented Jul 22, 2015 at 21:48
  • $\begingroup$ @ArnoudBuzing I'd be happy to, shall we do a chat session? $\endgroup$
    – M.R.
    Commented Jul 22, 2015 at 21:48
  • $\begingroup$ M.R. I wonder if you were able to solve your problem. If so, could you share what worked in an answer? $\endgroup$
    – MarcoB
    Commented Jul 31, 2015 at 20:33
  • $\begingroup$ @MarcoB Sadly still no luck! $\endgroup$
    – M.R.
    Commented Aug 25, 2015 at 21:16

2 Answers 2

3
$\begingroup$

sorry for answering so late but i just saw the question. Actually it is quite simple. Just go to evaluation>kernel configuration options add a new kernel and fill like this: enter image description here

replacing path/to/your/perm/key, yourec2user and your.ec2.address with your information.

notice that we are using macs native ssh instead of mathematica's java ssh. the -i option is used to connect with a perm key.

make sure that your ports are open in your ec2 instance. actually mathematica just picks up a random? port so just for testing open all of them. If that works, then you can replace linkname with openPort1@yourIp,openPort2@yourIP

Notice that your ip must be public in order for this to work. Mathematica at ec2 needs to know how to connect back to your end. If you don have a public ip, you can install openvpn at ec2 an connect to it previously to connecting to mathematica

$\endgroup$
5
  • 1
    $\begingroup$ This isn't working for me. $\endgroup$
    – M.R.
    Commented Jul 26, 2016 at 3:47
  • $\begingroup$ I followed all your instructions but I'm still getting this: "The kernel ssd failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end." $\endgroup$
    – M.R.
    Commented Jul 26, 2016 at 3:52
  • $\begingroup$ just to check... did you open al the ports at your ec instance ? $\endgroup$
    – elbOlita
    Commented Jul 27, 2016 at 12:41
  • 2
    $\begingroup$ @M.R. did you get this to work eventually? is it possible? $\endgroup$ Commented Jul 7, 2017 at 0:09
  • $\begingroup$ I did @ConorCosnett and it worked well, but v11.1 broke it, using a remote kernel with a local front end is no longer possible :( $\endgroup$
    – M.R.
    Commented Jul 7, 2017 at 1:37
1
$\begingroup$

Still doesn't work in v11.2:

This is a response to elbOlita:

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ I'm not sure so I have to ask – you do realize that "Basic options" is grayed out in elbOlita's answer, i.e. not used, yes? Because this is in no way a comment elbOlita's solution, which is completely different. $\endgroup$
    – C. E.
    Commented Sep 28, 2017 at 18:50
  • $\begingroup$ yes, I just pasted the wrong screenshot $\endgroup$
    – M.R.
    Commented Sep 28, 2017 at 19:25

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.