Executes a command on the Remote Host.
Result, as byte array, from Remote Host.
This example returns the results of a directory listing command executed on the Remote Host. Substitute a valid Remote Host, port, username, and password for the hostname, username and password parameters.
[C#]
Rexec rexec = new Rexec("hostname", "username", "password", "ls -al");
byte[] response = rexec.Execute();
string data = rexec.Encoding.GetString(response);
Console.WriteLine(data);
[Visual Basic]
Private WithEvents rexec As Rexec
rexec = new Rexec("hostname", port, "username", "password", "ls -al")
Dim response As Byte() = rexec.Execute()
Dim data As String = rexec.Encoding.GetString(response)
Console.WriteLine(data)
Rexec Class | Jscape.Telnet Namespace