SSH Plugin

The plugin provides functionality to execute commands via Secure Shell (SSH) connection protocol.

Installation

Example 1. build.gradle
implementation(group: 'org.vividus', name: 'vividus-plugin-ssh', version: '0.3.2-SNAPSHOT')

Properties

It’s allowed to configure unlimited number of SSH connections via mechanism of the dynamic properties. The properties prefix example is:

ssh.server.my-server

where my-server is a key used to refer SSH connection in the steps. The key is defined by users, must be unique and can’t contain dots.

The properties marked with bold are mandatory.
Property Name Acceptable values Default Description

ssh.server.<key>.username

<string>

The name of the user logging in

ssh.server.<key>.host

hostname or IP

The remote host

ssh.server.<key>.port

0..65535

The remote port (The standard TCP port for SSH is 22)

ssh.server.<key>.agent-forwarding

true false

false

Enable forwarding of the authentication agent connection

ssh.server.<key>.pseudo-terminal-enabled

true false

false

Allocate a Pseudo-Terminal

The following properties are used only for the password-based authentication

ssh.server.<key>.password

<string>

The password

The following properties are used only for the public key authentication

ssh.server.<key>.private-key

<string>

The private key

ssh.server.<key>.public-key

<string>

The public key

ssh.server.<key>.passphrase

<string>

The passphrase for the private key

The following properties are not applicable for SFTP

ssh.server.<key>.channel-type

exec shell

exec

In common *nix OpenSSH server:

  • The shell channel executes a login shell (as if you login with SSH terminal client).

  • The exec command takes a command as an "argument" and executes it in an isolated environment – still via user’s default shell, but not as a "login" shell, what may cause significant differences in the command execution.

With less common SSH servers, the difference can be even more significant. Some servers may even not support one of the channels. It is also quite common that they seemingly support both, but one of them (typically the exec) is completely broken.