Port NULL¶
Stimulation¶
This port has no stimulus capabilities.
Properties 🛈¶
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
SSH host |
uri |
Host address |
|||
SSH port |
22 |
int |
Host port |
||
SSH username |
string |
Username for the authentication. |
|||
Authentication method |
Keyfile |
[None, Password, Keyfile] Display values:
|
string |
Method used to log into the remote system. |
|
SSH key path |
Authentication method: ‘Keyfile’ |
string |
Path to the SSH private key for public key authentication. Can be specified absolute or relative to the tool host base path. If no tool host base path is set, the path can be relative to the workspace. Supported key formats: RSA, DSA, ECDSA and ED25519 |
||
SSH password |
Authentication method: ‘Password’ |
string |
Password of the specified user. Attention: The password is stored unencrypted in the TBC! |
||
Connection mode |
Auto |
[Auto, Manual] Display values:
|
string |
Defines whether the SSH connection is established automatically or manually via port job. |
|
File transfer protocol |
SFTP |
[SFTP, SCP] |
string |
Sets the protocol used to transfer files. If possible, SFTP should be preferred because it is the more stable and secure protocol. |
Jobs 🛈¶
Connect¶
Establishes the SSH connection. If the connection is already established, no action is performed.
Disconnect¶
Terminates the SSH connection. If the connection is already disconnected, no action is performed.
DownloadFileOrFolder¶
Copies a file or folder from the remote PC to the local machine.
Existing files will be overwritten.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
localPath |
string |
Local path to which the remote files are copied. Will be created if necessary. |
|||
remotePath |
string |
File or folder on the remote PC being copied. |
ExecuteInteractively¶
Note: Only supported for SSH hosts with a Linux distribution.
Runs the specified expression in an interactive session, waits for the output generated from it, and returns it. Unlike the ExecuteSshCommand job, all calls of this job act in the same shell; the context (e.g. set environment variables, current working directory) is preserved over all calls. The shell is closed at test case end.
This job is blocking and returns under these conditions:
The command was executed completely (successful or with error).
A configurable string is found in the SSH output (e.g. “password” for command “sudo pwd”).
The entire call takes longer than an adjustable timeout. In this case an error will be raised.
In the first two cases, the previously generated output lines of the SSH shell are returned.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
command |
string |
Command to be executed on the remote PC. |
|||
returnAtText |
string |
Abort condition for case 2). If not empty, the SSH output will be searched for this string and if present, the job call will be terminated. |
|||
timeout |
30 |
int |
Abort condition for case 3). Causes an error if the call is not finished after the specified time in seconds. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
List of all rows of SSH shell output that result from the given input. |
ExecuteSshCommand¶
Executes a command via SSH on the remote PC.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
command |
string |
Command to be executed on the remote PC. The command is executed in a separate session, which is closed again after the call. Multiple calls of the job are therefore independent of each other. The command is executed in an environment that is neither interactive nor a login shell. Therefore no shell environment variables are loaded. |
|||
nonBlocking |
False |
[False, True] |
bool |
If True, the job call returns immediately and returns only empty lists for stdout and stderr. |
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
object |
Tuple, containing the two standard data streams stdout and stderr. For each stream, the tuple contains a list of all corresponding lines. |
IsConnected¶
Returns if the SSH connection is established.
Parameterization
Return value
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
result |
[False, True] |
bool |
UploadFileOrFolder¶
Copies a file or folder from the local machine to the remote PC.
Existing files will be overwritten.
Parameterization
Parameter
Name |
Available if |
Default value |
Valid values |
Type |
Description |
|---|---|---|---|---|---|
localPath |
string |
File or folder on the local PC being copied. |
|||
remotePath |
string |
Remote path to which the local files are copied. Will be created if necessary. |