Remote Connections

There are two types of remote connections that you can establish to VMs using the nodes provided by this plugin package: SSH and WinRM. Additionally, if you are attempting a connection to VM running a Unix or Cisco Operating System (OS), then there are additional functionalites available to you (as compared to the rather basic SSH offerings).

the remote connection categories

SSH

The SSH category

The SSH category is rather basic and is meant to be simple to use. You initialize an SSH connection using the "Open SSH Connection" node. You can then reuse the produced "SSH Connection" object over and over until you are finished with the connection. You feed "ESXi SSH Connection" objects into the "SSH: Execute Command" node in order to execute the command you provide. When you are done, you close the connection with the "Close SSH Connection" node.

Take for example this graph that executes "ls -la" on a remote machine with an IP of "1.2.3.4":

A simple SSH example

Notice that you can chain the SSH connection object inbetween the nodes for easy reuse. This makes is possible to chain as many "SSH: Execute Commands" together as you want (without using variables). You can use the other output sockets on "SSH: Execute Command" to monitor the status code, stdout and stderr of the command that was just executed.

Another feature you might be interested in is quickly testing if an SSH connection is available. You can do this by unchecking (setting False) the box "Keep Connection Open" on the "Open SSH Connection" node.

Specialized Unix and Cisco SSH Connections

If you drill down into either of these individual categories, you will see nodes that perform common SSH actions on these operating systems. For example, the Unix category has a node called "Unix SSH: List Files", which will perform an operation similar to "ls" for you on the remote system. Notice that since this node knows what to expect as output, it will produce a list of filenames for you instead of the more annoying stdout (that you would normally have to parse yourself):

The unix ssh list files node

You will also see nodes specific to opening SSH connections to these operating systems: "Open Unix SSH Connection" and "Open Cisco SSH Connection". It is recommended that you use these specific initializing nodes when you already know the operating system you will be executing commands on. Both of these nodes produce the same "ESXi SSH Connection" object as the normal "Open SSH Connection" node.

the unix and cisco ssh connection nodes

If you plan to perform a command over SSH, I strongly suggest you read through your available options as prebuilt nodes first. This may save you the time and headache of graphing out a custom solution to your specific problem.

Executing Bash Scripts

There are two different ways to execute scripts on your remote Unix VMs. You can provide a string to execute as a bash script using the "Unix SSH: Execute Bash Script" node or provde the path to a script to execute using the "Unix SSH: Execute Bash Command" node:

The primary nodes for executing bash scripts

In general, use the "Unix SSH: Execute Bash Script" node when you want to use a GraphEx string and have it be executed as a bash script on the remote machine. It there is already a script written on the remote machine (or you want to execute a single command), then use the "Unix SSH: Execute Bash Command" node and provide it the path to execute the script just like if you were on the CLI (e.g. ./my_script.sh).

NOTE: Newer versions of this package have the node called 'Unix SSH: Execute Bash Command' whereas older versions have 'Unix SSH: Execute Command'. This change was made to help alleviate some of the confusion with the Execute Bash Script node being incorrectly used for both use cases.

Breakdown of Inputs and Outputs on Execution Nodes

This section give a more detailed description of what all the options do on the 'Execute Command' nodes. These descriptions have been copied from the various hover texts available for the node: 'Unix SSH: Execute Command'.

WinRM

Virtual Machines running the Windows Operating System can be connected to using WinRM connections. The nodes for WinRM are extremely similar to the "specialized" Unix and Cisco SSH connections discussed a little earlier on this page. You initiate a WinRM connection with the "Open WinRM Connection" node and you close it with the "Close WinRM Connection" node. There are a number of nodes for you to browse to perform common operations over WinRM in the 'WinRM' category.

Slightly different from the other connection node types, WinRM connections can either execute CMD (Command Prompt) or PowerShell commands:

Common WinRM nodes

Other than this slight difference, you can execute commands based off of "ESXi WinRM Connection" object instances in the same manners as the SSH nodes.

Click here to return to the main page for the ESXi Utilities plugin