Connecting to compute nodes and remote programs (remote-exec)
Linaro Forge attempts to use the ssh
secure shell by default when it needs to access another machine for remote launch, or as part of
starting some MPIs.
However, this might not always be appropriate,
because ssh
can be disabled or run on a different port to the default port 22. In this case, you can create a file called remote-exec
in your ~/.allinea
directory, which Linaro Forge uses instead.
Warning
To prevent unauthorized users modifying sensitive files and directories, and introducing unsafe code into your environment, ensure that you assign only the minimum permissions that are required, and avoid group or world-writable permissions.
Linaro Forge looks for the script at ~/.allinea/remote-exec
, and it is executed as follows:
remote-exec HOSTNAME APPNAME [ARG1] [ARG2] ...
The script must start APPNAME
on HOSTNAME
with the arguments
ARG1 ARG2
without further input (no password prompts). Standard output from APPNAME
appears on the standard output of remote-exec
.
For example:
SSH based remote-exec
This shows a remote-exec
script using ssh
running on a non-standard port.
#!/bin/sh
ssh -P {port-number} $*
For this to work without prompting for a password, generate a public and
private SSH key, and ensure that the public key is added to the ~/.ssh/authorized_keys
file on
machines you wish to use.
See the ssh-keygen
manual page for more information.
Testing
When you have set up your remote-exec
script, Linaro recommends that you test it from the command line. For example:
~/.allinea/remote-exec TESTHOST uname -n
This returns the output of uname -n
on , without prompting for a password.
If you are having trouble setting up remote-exec
, contact Forge Support for assistance.
Windows
The functionality is also provided by the Windows remote client. However, there are two differences:
The script is named
remote-exec.cmd
rather thanremote-exec
.The default implementation uses the
plink.exe
executable supplied with Linaro Forge.