Message Boards Message Boards

Connect with SSH tunneling?

Posted 4 years ago

Hello everybody,

I have a machine to which i can connect and successfully launch a remote kernel connection. The problem is that this machine is accessible only from inside a private network and can otherwise be connected through a "gate" server.

So what i typically do is tunneling all traffic from a port (say 1234) of localhost to the server through the gate.

In bash code I do this:

ssh -L 1234:remoteServerKernelIPAddress:22 username@gateServer

And then i can connect with a simple

ssh username@localhost -p 1234

How can I specify the port in the remote Kernel Configuration?

POSTED BY: Ettore Mariotti
2 Replies
Posted 4 years ago

Remote kernel strategies does not work in Mathematica 12. It seem that the approach used in the original paper is explicitly blocked -- MathLink`CreateFrontEndLink is now blocked.

Moreover, in Mathematica 12 it seems impossible to attach notebook to remote kernel accessible via VPN -- Kernel starts but FrontEnd then asks kernel to connect to FrontEnd's local IP (which is inaccessible to remote kernel).

I personally found no way to make front end use specific IP address.

Overall passing IP addresses over the network expecting the other side to connect seems like FTP in 21 century :(

Said this. Kernel Configuration Options is completely broken in Mathematica 12. It does not save changes and you have to edit init.m by hand.

POSTED BY: Pavel Perikov
Posted 4 years ago

I'm glad that you've asked that question! Before MMA12 for Mac I've been using this approach:

https://mathematica.stackexchange.com/questions/77881

of @elbOlita, but currently it leads to crash. Maybe some Mathematica engineers here could test this approach and fix it for MMA12.0.1? I've already filed a bug report about a month or two ago, but haven't found a workaround.

POSTED BY: Michal M
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract