Running MATLAB using SSH tunneling to access EECS license server

With SSH tunneling, MATLAB license requests are forwarded from your computer's local ports 1726 and 1727 over a secure Internet connection via indigo to port 1726 and 1727 on our license server.

Linux / MacOS X

SERVER 127.0.0.1 000102030405 1726
USE_SERVER
#!/bin/sh
echo Forwarding local ports 1726:1727 to license server
 
ssh -2 -N -x -L 1726:licenseserv.eecs.yorku.ca:1726  \
-L 1727:licenseserv.eecs.yorku.ca:1727 EECS-USERNAME@indigo.eecs.yorku.ca
chmod 755 connect-matlab-license-server.sh
./connect-matlab-license-server.sh

When you run the script you will be prompt for a password, enter your EECS account password. You are now connected to the EECS license server.

MacOS X
/Applications/MATLAB_R2018a.app/bin/matlab -c ~/localhost.lic 
Linux
matlab -c ~/localhost.lic 

Windows

C:\Program Files\MATLAB\<release>\licenses\network1.lic 
C:\Program Files\MATLAB\<release>\licenses\network2.lic

Note: You can rename the existing network.lic to network1.lic

network1.lic contents:

SERVER licenseserv.eecs.yorku.ca 000102030405 1726 
USE_SERVER 

network2.lic contents:

SERVER 127.0.0.1 000102030405 1726 
USE_SERVER 
@echo off
echo Forwarding local ports 1726:1727 to license server
echo Close this Command Prompt window to terminate session!
 
if exist "%ProgramFiles(x86)%\PuTTY\plink.exe" set PLINK="%ProgramFiles(x86)%\PuTTY\plink.exe"
if exist "%ProgramFiles%\PuTTY\plink.exe" set  PLINK="%ProgramFiles%\PuTTY\plink.exe"    
 
 
%PLINK% -2 -N -x -L 1726:licenseserv.eecs.yorku.ca:1726 -L 1727:licenseserv.eecs.yorku.ca:1727 EECS-USERNAME@indigo.eecs.yorku.ca


PuTTY can be downloaded from http://www.chiark.greenend.org.uk/~sgtatham/putty .