PuTTY SSH

This node uses a SSH connection to PuTTY to send a shell script from Windows to a Linux system and to run it there.

Expected File Content

There are no special requirements to the script content, ensure that it runs successful on your Linux system.

System Requirements

The node requires an existing password-less login. For more details see this article. The password-less login must be saved as the Default configuration of PuTTY.

Node Settings

The Process tab allows you to define the login details and the remote working directory.

FieldDescription
User nameDefines the user name.
Host nameDefines the host name or IP address to connect to.
Remote working directoryDefines the remote working directory by using one of the following options:
  • Use the given Absolute path for every design (Not recommended for cases of parallel computing).

  • Create a Unique additional folder for every design.

  • Use a Shared drive if the optiSLang project is located in a local and remote accessible folder

Poll process until finished on errorWhen selected, the node will try to handle SSH connection errors or crashes, for example when the network connection is interrupted for a short time. This changes the way the remote script is executed by redirecting the stdout and stderr streams to files in the same directory. The logs inside those files are only available after the run.
Poll process timeoutDefines the maximum time period in seconds to wait for the remote process to finish after a crash. For example, If the remote script runs for 5 minutes and this setting is set to 2 minutes, the polling will be successful if the crash occurs after 3 minutes. If it crashes earlier, the node will fail with a timeout error. Ansys recommends setting this value to the expected duration of the remote script.
PID polling intervalAfter the remote script is executed, the node will try to retrieve the ID of the spawned process to poll it. This setting defines the interval for polling this PID in seconds. Ansys recommends setting it as low as possible.
Process polling intervalDefines the interval in seconds to send polling commands to the remote machine after the connection broke.

The Send input files tab allows you to define process input files. They are sent to the remote working directory before running the process. If you are using a shared working directory, this tab is not available.

  • Click Add file to add another input file.

  • Type the Working file name or click Select on Windows to browse for the file.

  • Click X to delete an input file.

The Receive output files tab allows you to define process output files. They are received from remote working directory after running the process.

  • Click Add file to add another output file.

  • Type the Working file name or click Select on Windows or Select on Linux to browse for the file.

  • Define the Importance of the file:

    • Required file. The process raises an error if it is missing.

    • Optional file. The process does not raise an error if it is missing.

    • Wait for file. The process waits for the file or stops if the Maximum wait time is reached (0=infinite).

    • Wait, indicated failure file. The process stops with an error if the file exists.

  • Click X to delete an output file.

The Delete files tab allows you to define files to delete. They are deleted from the remote working directory after receiving output files. If you are using a shared working directory, this tab is not available.

  • Select Delete remote working directory to delete the whole directory including its content.

  • Click Add file to add another file to delete.

  • Type the Working file name or click Select on Windows or Select on Linux to browse for the file.

  • Click X to delete a file.

Run Options

This node has general Run Options. The number of supported options is individual for each node.

Setting Environment Variables

Due to different shells on Linux systems, the command to set an environment variable may differ. It can be changed in the %appdata%\Roaming\Ansys\optiSLang\optiSLang_PuTTY_SSH.ini config file. Available commands are:

ValueExample Command
export (default)export MYPWD=$PWD
setenvsetenv MYPWD $PWD
declaredeclare -x MYPWD=$PWD
""MYPWD=$PWD
Troubleshooting

I need to change the PuTTY executable path because optiSLang cannot find the PuTTY executable or for some other reason.

  1. Open the %APPDATA%/Ansys/optiSLang/optiSLang_PuTTY_SSH.ini configuration file.

  2. Change the value of putty_install_path to the location of PuTTY (for example, tools/putty) in your latest optiSLang installation

Supported Versions

See the Supported Integration Versions table.