ssh port forwarding from windows computers

If you are checking out one of your group licenses from the license server on the Hoffman2 cluster from a windows box please follow these directions:

1) Open a ticket and send us your username on the local machine where you intend to run/install locally your group's purchased licensed software (you will NOT be able to check out a license if you do not ask for your local username to be added to the list of users that can check out a license)

2) Install: Git BASH, Git for Windows, provides a BASH emulator that can be used to run ssh from the Git BASH command line on Windows. To install Git BASH navigate to https://git-for-windows.github.io and click on the Download link.

3) Once you have this installed start GIT BASH and issue from its command prompt (all on one line):

ssh -g -L PORTWHEREFLEXLMLISTEN:lm:PORTWHEREFLEXLMLISTEN -g -L PORTWHERETHEVENDORDAEMONLISTEN:lm:PORTWHERETHEVENDORDAEMONLISTEN -f YOURHOFFMAN2USERNAME@hoffman2.idre.ucla.edu -N



you will receive a login prompt from hoffman2, for the sole purpose of port forwarding, enter your password for the ssh port forwarding to be established.

For example if the software is running flexlm and it is listening on port 1234 while its vendor is listening on port 5678 and your user id on the Hoffman2 cluster is gobruin you would issue at the GIB BASH prompt:


ssh -g -L 1234:lm:1234 -g -L 5678:lm:5678 -f gobruin@hoffman2.idre.ucla.edu -N


The ssh port forwarding creates a logical equivalency between ports 1234 and 5678 on the loopback interface of your computer (localhost) and the same ports on the license manager on hoffman2 (which seats behind the login nodes).

Please notice that you will need to confirm with us which ports are used by the specific software you are trying to run locally.

4) Once you have established an SSH port forwarding you will generally need to specify where the software installed (or to be installed) on your local machine should look for the license server. In most cases this can be accomplished by setting the value of one or more environmental variables.

Typically there will be a file in the installation directory that will need to be set to something similar to:

SERVER=1234@localhost
VENDOR_SERVERS=5678@localhost


note the name of the variables will likely be something different and also perhaps only the SERVER line may be needed, or it may look like:

SERVER localhost ANY 1234
USE_SERVER


You will need to check with the specific software documentation.

As a last resource in FlexLM the generic environmental variable is LM_LICENSE_FILE this can be set to:

1234@localhost


we advise against specifying LM_LICENSE_FILE as a wondows environmental variable since unexpected behaviors may occur upon opening other applications that use flexlm.

If you are installing the licensed software while checking out a license from Hoffman2 you will generally be prompted for the location of the license manager which you will set to:

localhost



5) when you are done with local use of the licensed application, close the application AND close the ssh port forwarding by going back to GIT BASH and issuing at its command prompt:

ps aux


make node of the numeric PID of the ssh process and issue:

kill <PID>



As usual, should you have any problems let us know by either opening a ticket or by writing to: hpc@ucla.edu
Creation date: 9/20/2017 2:34 PM      Updated: 10/28/2019 9:57 AM