Simcenter STAR-CCM+ How to use PuTTy to connect a Windows client to Linux server

2023-09-04T12:38:18.000-0400
Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter Cloud HPC Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

Simcenter STAR-CCM+ is built with a client-server architecture and this article discusses how to take advantage of that architecture across different operating systems.


Details

Simcenter STAR-CCM+ has been designed with a client-server architecture, meaning that the process which does the heavy computation (server) can be on a different machine than the process with which the user interacts (client). Additionally, these two processes do not need to be running on the same operating system, which means that a user can have the client running on a Windows machine while the server is running on a Linux cluster, among other possibilities. One of the requirements to make this work is a passwordless ssh connection between the two machines being used.

Setting up the SSH connection in a homogenous Linux environment is relatively straightforward. If one wants to run the client on a Windows machine, there is a need to install an SSH client since the older versions of Windows do not have one natively (In Windows 11, a native ssh client based on OpenSSH can be added to the operating system). While there are a few options (openSSH and Cygwin), this article will describe the procedure when using the PuTTY tool.

The guidelines listed below may require the active cooperation of a competent IT analyst with root access to the machine. 

1. Install PuTTY on the Windows machine. This utility is useful for accessing SSH functions on Windows machines and is also used to open remote terminals around a network. PuTTY contains a utility that is called plink.exe which is an SSH client that can be used with Simcenter STAR-CCM+ to make the connection from the client to the server.

2. Add the PuTTY installation directory (for example C:\Program Files (x86)\PuTTY) to your PATH system variable. 

3. Next, create a public/private key pair on the local Windows machine. Start PuTTYgen.exe (which can be found in the Start Menu) and select the RSA option and set the number of bits in the generated key to 2048. Click "Generate" and then follow the prompts.
 
PuTTY Key Generator.png
4. Select the "Save Private Key" button and click "Yes" to the password protect option. This creates a .ppk file. Remember where this key is stored as you must access it later to load it into the key manager, Pageant. This key is the private key of your machine and should not be shared.

5. Copy the public key to the remote machine. For a Linux machine, add the public key to the end of the authorized_keys file in the ~/.ssh/ directory. The best way to do this is to copy the text from the public key area (see image below) and then paste that onto a new line in the authorized_keys file. This text should be one long line of text.
 
PuTTY Key Generator generated key.png

6. Enable passwordless ssh by locally importing the private key into Pageant. To do this, open Pagaent (it often resides in the system tray or launch it from the Start menu) and then right-click to select Add Key. Navigate to the private key created in step 5 and provide the appropriate password. If successful, the process should be complete.

7. Lastly, set the Simcenter STAR-CCM+ default values for a remote process launch. To do this, open the Simcenter STAR-CCM+ GUI and navigate the top menu to Tools > Options. Select Environment from the left-hand side and look for the options Generic Remote Process Launch Command and/or Server Remote Process Launch Command. For a Windows client, we want to set our Generic Remote Process Launch Command to be PuTTY, but we want our Server Remote Process Launch Command to be either rsh or ssh (depending on what is available on the Linux machine). This allows Simcenter STAR-CCM+ to use PuTTY to connect the Windows client to the Linux server but to also use the appropriate command on the Linux server to launch the parallel processes (if a parallel server is enabled).
 
Simcenter STAR-CCM+ command changes.png

Note that ssh was set up only in a single direction, from the Windows machine to the Linux machine. In order to set up the reverse direction, an ssh server must be running on the Windows machine. Information on this process can be found in How to install an SSH Server on your Windows workstation (for CAD Client remote coupling).

KB Article ID# KB000032807_EN_US

Contents

SummaryDetails

Associated Components

Design Manager Electronics Cooling In-Cylinder (STAR-ICE) Job Manager Simcenter STAR-CCM+