Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is no Mathematica-language specific question but rather a network problem, so if this is the wrong place to ask, I apologize.

I am running Mathematica on Windows 7, the license manager mathlm is running in a local network. How can I access Mathematica when being outside the local network. Is there some tool like license checkout for let's say two hours?

If this is not possible with Mathematica, is there some way to forward the ports for license manager via ssh and are there problems/restrictions with Windows 7? Btw, contacting the server via ssh is possible.

share|improve this question
Ask your organization/university if they have a virtual private network (VPN) set up (many do). This is a very common way to work around problems like this. After connection to the VPN it'll appear as if you were on the local network. – Szabolcs Dec 3 '12 at 14:52
In general, VPN is a reasonable approach, but in this case it won't work. I'm still inside the network of the university (where I could enter via VPN), but as long as I am connected via WIFI, I don't have access to the institute's license server (though I can access it via ssh). Any other ideas? – kromuchi Dec 3 '12 at 14:57
Well, it is always possible to forward ports using ssh, but I have no experience with license servers, so I don't know what server Mathematica would try to connect to (you have to get it to try to connect to your own machine after forwarding the ports). There are lots of tutorials on how to forward ports, here's the first one from google:… Sorry I can't help more. When I tried to use port forwarding to connect to a remote kernel (not license manager), it was always a lot of trouble. – Szabolcs Dec 3 '12 at 15:01
up vote 8 down vote accepted

Thanks to @halirutan and @Szabolcs, I found a working solution by myself. Apparently it won't work with localhost on Windows7 but with

To sum up, I present the ssh-commands, so other users might gain something from this (use your own network names or IPs here):

  1. First connect through the firewall via ssh.server: ssh -L 16286: user@ssh.server
  2. then forward to another gateway, where you can switch ports again: ssh -L 16286:mathlm.server:16286 second.gateway.server

Use either cygwin or putty, (and make sure, you run them as with sufficient rights -- e.g. as Administrator).

Then you have to enter ! in your mathpass file (or enter once Mathematica asks you for the license server).

share|improve this answer

You question does basically not fit here, but I'm sure it is still one of the best places to ask. I think we shouldn't be too pedantic with the rules. Let me give you some advice, which will unfortunately only help you, if you can cooperate with your admin of the server:

  • You have to ensure, that you can reach the license server over an IP, because this is what you will write in the mathpass file. If the license-server does run in a local network and has no public IP and you want to access it from anywhere public, I think the usual way will not work.

  • You have to ensure, that you can reach the license-server over the port 16286! Since you can access it over ssh it seems this port is not open to the outside world. In our setting at university, the firewall has to know every pc which wants to access the license server.

  • You maybe already know, that you then have to use the IP of the license server in your mathpass file by entering something similar to


share|improve this answer
OK, basically I had all requirements fulfilled, but you gave me the right hint. For port forwarding, I used localhost what -- appareantly -- won't work on Windows 7. Instead you have to use To sum up, I present the ssh-commands, so other users might gain something from this: First connect through the firewall via ssh.server ssh -L 16286: user@ssh.server and then forward to another gateway, where you can switch ports again ssh -L 16286:mathlm.server:16286 second.gateway.server. Use either cygwin or putty. – kromuchi Dec 3 '12 at 15:27

Your Answer


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.