SSH test step

The SSH test step establishes a connection to a host on the given port using the specified user, password and SSH key. If the ssh key is empty, standard password-based authentication is performed. If both an SSH key and a password are given, the password will be used for the key.

Note The SSH key must be BASE64 encoded not containing newline characters. The following OpenSSL command can be used to convert an SSH key: openssl base64 -A -in <keyfile>

If no command is specified, the step will only connect to the host and fail if the connection fails. If a command is given, it will be executed on the host after successful connection and the output of the command is recorded as the result of the test step and can be viewed using the Wenenu UI or accessed using the Wenenu API. The maximum length of the command output is 524288 characters. The output is truncated if it exceeds the maximum length. The step also fails if the executed command exits with a non-zero exit code.

Warning For security reasons, do not display any sensitive information in the step result.

UI settings

SSH step UI settings
Figure 1. SSH step UI settings

1

Arbitrary name of the test step up to 64 characters

2

Test agent that is going to execute the test step

3

The host of the SSH connection

4

The port of the SSH connection

5

The username of the SSH connection

6

(Optional) The password of the user or the SSH key

7

(Optional) A command that will be executed on the host

8

(Optional) BASE64 encoded SSH key that is used for the connection

JSON

{
  "displayName": "DB integrity check", 1
  "type": "ssh", 2
  "id": "5a7a08e0-e0cc-432b-9c4a-6d11895cf9bc", 3
  "host": "db1.example.com", 4
  "port": 22, 5
  "username": "testuser", 6
  "password": "testpassword", 7
  "command": "/bin/integrity-check.sh", 8
  "key": "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFc==", 9
  "agent": { 10
    "type": "standard",
    "id": "162dff466f92c372005cf7055d006b77ac377e01c60ae59f942d74680f2496d1"
  }
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'ssh'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 The host of the SSH connection
5 The port of the SSH connection
6 The username of the SSH connection
7 The password of the user or the SSH key
8 A command that will be executed on the host
9 BASE64 encoded SSH key that is used for the connection
10 Agent object defining the agent that will execute the test step