Simcenter STAR-CCM+ How to Set Up a Passwordless SSH Connection and Connect a Windows Client to a Linux Server Using PuTTY

2024-11-21T15:08:23.000-0500
Simcenter STAR-CCM+ CAD Clients Simcenter STAR-CCM+ Simcenter STAR-CCM+ Virtual Reality Teamcenter Share Simcenter STAR-CCM+ Viewer Simcenter STAR-CCM+ Application Specific Solutions

Summary

This article explains how to set up a passwordless SSH and leverage Simcenter STAR-CCM+'s client-server architecture for Windows client and Linux server using PuTTY.


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 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. You will need to connect to the remote host at least once using PuTTY to accept the remote finger-print. Open PuttY and provide your host name in the connection window


8. 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 Server Remote Launch Command to be ssh or rsh (depending on what is available on the Linux machine), but we want our Generic Remote Process Launch Command to be PuTTY. 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

Simcenter STAR-CCM+ Clients