TerminalScriptingWinForm - GUI SSH and telnet client scripting sample

A sample that demonstrates scripting capabilities of TerminalControl and VirtualTerminal objects.

Sample application that demonstrates scripting capabilities of Rebex SSH Shell library.

The following features are covered:

C#

// create a new Ssh object
Ssh ssh = new Ssh();

// connect to the SSH server
ssh.Connect("hostname");

// login to the SSH server
ssh.Login("username", "password");

// get a scripting object
Scripting scripting = ssh.StartScripting();

// detect prompt
scripting.DetectPrompt();

// execute a command
scripting.SendCommand("uname -a");

// read response
string response = scripting.ReadUntilPrompt();

VB.NET

' create a new Ssh object
Dim ssh As New Ssh()

' connect to the SSH server
ssh.Connect("hostname")

' login to the SSH server
ssh.Login("username", "password")

' get a scripting object
Dim scripting As Scripting = ssh.StartScripting()

' detect prompt
scripting.DetectPrompt()

' execute a command
scripting.SendCommand("uname -a")

' read response
Dim response As String = scripting.ReadUntilPrompt()