Open SSH Tunnel
Verb: openSSHTunnel
Available from: <Enterprise>
Opens an SSH tunnel using the opened SSH connection to the server, remote and local ports, the destination and the host.
Syntax
openSSHTunnel --client(SSHSession) --port(Numeric) --boundport(Numeric) [--destination(DestinationType)] [--host(String)] (SSHForwardedPort)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--client | SSH Connection | Required | SSH Session | Variable containing the opened SSH connection. |
--port | Remote Port | Required | Number | Destination host port number. |
--boundport | Local Port | Required | Number | Source host port number. |
--destination | Destination | Optional | DestinationType | Destination selection option:
|
--host | Host | Optional | Text | Path to the destination host. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | SSH Tunnel | SSH Forwarded | SSH tunnel with the connection established. |
Example
A connection to an SSH server is initiated and tunneling to the destination server is opened, and the command "ls" is sent to get the file list from the current directory of the destination server.
defVar --name sshConnection --type SSHSession
defVar --name sshTunnel --type SSHForwardedPort
defVar --name result --type String
// Initiates the connection to an SSH server and tunneling to the destination server.
startSSH --host "172.16.4.200" --username "User Name" --password password --port 22 --keygen "File with private key" --passphrase "password phrase" --timeout 00:00:05 sshConnection=value
openSSHTunnel --client ${sshConnection} --port 80 --boundport 8090 --destination "Local" --host "192.168.0.10" sshTunnel=value
// Sending the "ls" command to the SSH server for a list of file names from the current directory of the destination server.
executeSSH --client ${sshConnection} --command ls --timeout 00:00:05 result=value
// Connection to an SSH server to send commands to it is demonstrated.
//All host, port, and connection data is for example only, with both client services and SSH server installed.
// The user must enter valid data for a valid SSH connection!
Remarks
The open connection required by the SSH Connection parameter is generated by the SSH Login command.