User Tools

Site Tools


software:matlab:ssh-tun

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:matlab:ssh-tun [2020/03/26 10:56] paulgsoftware:matlab:ssh-tun [2020/03/27 12:15] (current) paulg
Line 1: Line 1:
-===== Running MATLAB from outside EECS VLANs =====+===== Running MATLAB from outside EECS =====
  
-If you would like to use MATLAB off campus and still use the EECS license server, you need to setup your computer to forward license requests from MATLAB on your computer +If you would like to use MATLAB off campus and use the EECS license server, you need to setup your computer to forward license requests to our license server.
-to our license server via a SSH technique called SSH tunneling or you can use York's VPN service.+
  
   * [[matlab-yuvpn]]   * [[matlab-yuvpn]]
 +  * [[matlab-ssh-cli]]
  
-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 === 
- 
-  * Create a new MATLAB license file called localhost.lic in in your home directory. with the following contents. 
-  * **Note:** With MATLAB R2017A and newer, if your localhost.lic file has **localhost** on the **SERVER** line, it should be replaced with IP number **127.0.0.1**. Failure to make this change will result in a license error.  
- 
-<code=text> 
-SERVER 127.0.0.1 000102030405 1726 
-USE_SERVER 
-</code> 
- 
-  * Use the following shell script **''connect-matlab-license-server.sh''** to establish an SSH tunnel connection to the departmental licence server. Save the file in your home directory. //**Be  sure to replace EECS-USERNAME with your EECS username**// 
- 
-<code=text> 
-#!/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 
-</code> 
- 
-  * Run the script from the command line to create a SSH tunnel 
- 
-<code=text> 
-chmod 755 connect-matlab-license-server.sh 
-./connect-matlab-license-server.sh 
-</code> 
- 
-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. 
- 
- 
-  * Start MATLAB, using our SSH tunnel. 
- 
-== MacOS X == 
-<code=text> 
-/Applications/MATLAB_R2018a.app/bin/matlab -c ~/localhost.lic  
-</code> 
- 
-== Linux == 
-<code=text> 
-matlab -c ~/localhost.lic  
-</code> 
- 
- 
-=== Windows === 
- 
-  * **Create new network license files:** 
- 
-  * License paths for MATLAB: 
-<code="text"> 
-C:\Program Files\MATLAB\<release>\licenses\network1.lic  
-C:\Program Files\MATLAB\<release>\licenses\network2.lic 
-</code> 
- 
-**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  
- 
- 
-  * Launch a text editor (Not MSWord) and save the following content into a file called **connect-matlab-license-server.cmd** on your desktop. //**Be  sure to replace EECS-USERNAME with your EECS username**// 
- 
- 
-<code=text> 
-@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 
-</code> 
- 
-  * Use batch script connect-matlab-license-server.cmd you just saved to establish a SSH tunnel connection to the departmental licence server.  
-\\ 
-PuTTY can be downloaded from [[http://www.chiark.greenend.org.uk/~sgtatham/putty|http://www.chiark.greenend.org.uk/~sgtatham/putty ]].  
- 
- 
-  * Before you start MATLAB, double click on the connect-matlab-license-server.cmd icon on the desktop. The first time you connect, you will be prompted to save the server key into your local cache. Enter your password when prompted. 
- 
-  * **Note:** With this setup you will experience a delay when you launch MATLAB if you are not connected to EECS's wired network.  
  
software/matlab/ssh-tun.1585234596.txt.gz · Last modified: by paulg