////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /pipeline/transforms/
:language: en_US
:description: The Run SSH Commands transform allows you to execute commands over the secure shell (ssh) TCP/IP protocol.

= image:transforms/icons/ssh.svg[Run SSH commands transform Icon, role="image-doc-icon"] Run SSH commands

[%noheader,cols="3a,1a", role="table-no-borders" ]
|===
|
== Description

The Run SSH Commands transform allows you to execute commands over the secure shell (ssh) TCP/IP protocol.

You can pass text to stdout or stderr in the commands. This information can then be picked up by the transform and passed in a field to subsequent transforms.

|
== Supported Engines
[%noheader,cols="2,1a",frame=none, role="table-supported-engines"]
!===
!Hop Engine! image:check_mark.svg[Supported, 24]
!Spark! image:question_mark.svg[Maybe Supported, 24]
!Flink! image:question_mark.svg[Maybe Supported, 24]
!Dataflow! image:question_mark.svg[Maybe Supported, 24]
!===
|===

== Options

=== General Tab

[options="header"]
|===
|Option|Description
|Transform name|Name of the transform.
|Server name / IP address|You can specify the server or IP address of the machine on which you want to execute a command.
|Server port|The TCP/IP port on which the ssh protocol lives on the server.
The default is 22.
|Timeout|The timeout in seconds.
If set to a number larger than zero you can specify a non-default connection timeout.
|Username|The username to log in with.
|Password|The password to use.
|Use key|Enable this option if you want to log in using a private key
|Private key|The private key file.
The private part of a private/public RSA key-pair (see: ssh-keygen)
|Passphrase|The optional pass-phrase used when the key-pair was generated.
|Proxy host|The proxy server host to use (name or IP address).
|Proxy port|The proxy server port to use.
|Proxy username|The proxy user name.
|Proxy password|The proxy password .
|Test connection|Use this button to see if the supplied credentials are sufficient for logging into the SSH server.
|===

=== Settings Tab

**Output**

[options="header"]
|===
|Option|Description
|Response field name|The name of the String output field that will contain the output of the executed command. This is the concatenation of both the stdout and stderr command output.
|Error response field name|The name of a Boolean output field that will contain true if there was an error and false if the ssh command was executed successfully.
|===

**Commands**

[options="header"]
|===
|Option|Description
|Get commands from field|Enable this option if you want to execute commands specified in an input field
|Commands field name|Select the input field that will contain the commands to execute
|Commands|Field allows you to specify the commands to execute.
|===
