Agent plugins able to communicate with remote devices using secure shell (SSH) version 2 with the built-in SshSupport class, accessible through the Ssh property.



IsConnected

Determines whether the SSH system is connected and authenticated.


Connect

If the SSH system is not already connected the following method can be used


SshConnectionSettings settings = new SshConnectionSettings();
settings.Credentials.Username = "admin";
settings.Credentials.Password.SetPassword("secret");
Ssh.Connect("demo-switch01", settings);

Disconnect

Disconnects from the remote SSH host. This is done automatically by the system when the scan completes.


Dispose

Disconnects from the remote SSH host, and disposes of the connection. This is done automatically by the system when the scan completes.


ExecuteCommand

Executes the specified command and returns the response.


ExecuteUnixCommand

Executes the specified command and returns the response on a Unix system. The exit code is checked and an exception thrown if the command did not execute successfully. The method takes the useSudo parameter to determine if sudo should be used to execute the command.


Ssh.ExecuteUnixCommand("cat /etc/hosts", true);


ExecuteManualCommand

Executes the specified command and returns the response on a remote system that does not respond using industry standard new line characters.


Prompt

The command prompt currently displayed on the SSH host.


Settings

The settings used to establish the SSH connection.