The SSHEnvironment makes it possible to delegate tasks to a remote multi-core server through an SSH connection.

SSH credential

OpenMOLE offers several ways to authenticate to a remote machine through SSH (login/password and private key). The following instructions explain how to setup SSH authentications. First make sure your credential are properly working by connecting to the server with ssh using either a key/password authentication or a private key based authentication.

Graphical interface

If you are using the graphical interface you can simply configure them in the authentication panel and choose "ssh private key" or "ssh password".


In console mode, you can define an authentication using a pair of login / password with the following command:
SSHAuthentication += LoginPassword("login", encrypted, "machine-name")

Or to authenticate with a private key:
SSHAuthentication += PrivateKey("/path/to/the/private/key", "login", encrypted, "machine-name")

Both calls mention the encrypted function. This function will prompt for the password/passphrase of the private key right after the call to the builder of the Environment using this SSHAuthentication.

The last part of the SSHAuthentication: "machine-name" should match exactly the address of the machine in you execution environment. OpenMOLE search the matching ssh keys using an exact match on login and machine-name between the environment and the stored keys.

In case you encounter troubles at setting up an SSH connection in OpenMOLE, you should check the corresponding troubleshooting section.

Use the SSH environment in your workflows

Once the SSHAuthentication is defined, all that is left is to define the SSHEnvironment:
val env =
    10 // The number of cores you want to use on the remote server

You also can set options by providing additional parameters to the environment (..., option = value, ...):
  • port: the number of the port used by the ssh server, by default it is set to 22,
  • openMOLEMemory: the memory of attributed to the OpenMOLE runtime on the execution node, if you run external tasks you can reduce the memory for the OpenMOLE runtime to 256MB in order to have more memory for you program on the execution node, for instance openMOLEMemory = 256 megabytes,
  • threads: the number of threads for concurrent execution of tasks on the worker node, for instance threads = 4,
  • workDirectory: the directory in which OpenMOLE will run on the remote server, for instance workDirectory = "${TMP}",
  • name: the name an environment will take in the logs.