4.2.1

Table Of Contents
Method Returns Description
changePassphrase(Path,SecureStr
ing,SecureString):Object
Object
Changes the passphrase of a private
key.
generateKeyPair(string,Path,Sec
ureString,number,
string):string
String
Generates a pair of a public and a
private key. Returns the generated key
fingerprint.
SSHCommand Class
The SSHCommand class is the main class for running SSH commands from workflows.
The SSHCommand class defines the following constructors.
Constructor Description
SSHCommand(string,string,SecureString):SSHCommand
Creates a new SSHCommand.
SSHCommand(string,string,string,number):SSHCommand
Creates a new SSHCommand.
The SSHCommand class defines the following attributes.
Attribute Returns Description
cmd String
Command to run
error String
Command error, if any
NOTE The error message depends on
your operating system. The operating
system returns a string from the error
messages buffer.
exitCode Number
Exit code of the last command
NOTE The exit code depends on your
operating system. Refer to your
operating system's documentation for
descriptions.
output String
Command output, if any
state String
Run state
The SSHCommand class defines the following methods.
Method Returns Description
disconnect():Object Object
Disconnects the current session.
execute():Object Object
Runs a single command and returns
immediately. Leaves an open session.
You can disconnect the session
manually.
executeAndLog(string):Object Object
Runs a single command and waits until
it is completed.
executeCommand(string,boolean):
string
String
Runs a single command, waits until it is
completed, and returns the stdout
result, if synchronous. Leaves an open
session. You can disconnect the session
manually.
findAll(string,string):string[]
Array of String Searches recursively and returns files
and directories that match a pattern.
Leaves an open session. You can
disconnect the session manually.
Chapter 5 Using the SSH Plug-In
VMware, Inc. 43