You are here

Setting up SSH tunnel to Concordia machine

SSH Tunnel to a Concordia Machine

The ENCS user managed machine can only be accessed through ENCS network. In order to access it from outside ENCS, certain housework has to be done first. For example if you need to launch matlab from home you MUST connect to the matlab license server. To do so, you need to establish a SSH tunnel.

Establishing SSH tunnel

To use an SSH tunnel, you must first establish the tunnel using an SSH client. Most SSH clients for Windows allow you to create a SSH tunnel. In this document we focus on a free SSH client software, Putty. You can download Putty here. You don't need to install the program; just save the executable in a convenient place like the Desktop.

To establish SSH tunnel by Putty:

Example: Establishing a connection to the matlab license server (Please note, ENCS Matlab license can only be checked out from a ENCS distributed Matlab software on a Concordia owned computer)

Note: In the License Server page above, some of the softwares do not have Vendor Daemon Port number, such as ABAQUS. Therefore to establish a connection to the ABAQUS license server, you need to have the server information, "" and lmgrd port information, "27010".



  1. In the above URL (License Server page) under Software column you will see MATLAB which points to "", under "Lmgrd Port" column MATLAB points to 1711 and under "Vendor Daemon Port" column MATLAB points to 5001.
  2. Please collect these three important informations which will be needed for the tunneling purpose, which are:
    2. 1711
    3. 5001
  3. Since you have three important informations in hand for the above example, thus launch putty.exe which was saved on your desktop in the earlier stage.
  4. In the Category pane of the application window, select the 'Tunnels' option found under Connection>SSH. Fill up the Source port with 1711 and Destination with Click Add button, the entry will appear in Forwarded ports windows.
  5. Repeat the same percedure for 5001 and click on Add button. This is the image of how it should look:

  6. In the Category pane, click on Session and:


    1. In order to establish a connection to any machine in the ENCS world you must tunnel through with the port number 22.
    2. Therefore, on the right hand side of Category pane, for Host Name (or IP address), type in, with Port vlue 22.
    3. Select SSH as your protocol. This should set the port number to 22.
  7. Click Save and then name the session (we name it as connection_to_matlab).
  8. This is an image of how it should look now: 
  9. Click Open. If Putty warns you about keys, you can click okay.
  10. Enter your ENCS username and password when prompted.
  11. The last step is to make sure that your matlab license file which is called license.dat is pointing to the right host. To do so, go to the matlab folder on your home machine and search for license.dat file. In my case, the matlab license file is residing in C:\MATLAB\R2007a\bin\win32. Open the file and change the server name to localhost.
  12. This is the image of how it should look:

Note, next time you do this, you can simply double-click the session name (connection_to_matlab in this documentation) to establish the SSH tunnel for connecting to the matlab license server.

Establishing SSH tunnel in Linux

To establish a SSH tunnel from Linux to '', enter the following command in a terminal window:

ssh -L

ssh -p 4444 'your_username'@localhost

For sftp use the below command.

sftp -oPort=4444 localhost