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 under root user on the Remote Host using port 1010. Substitute a valid Remote Host, user, and local user for the hostname, username, and localuser parameters.
[C#]
Rsh rsh = new Rsh();
byte[] response = rsh.Execute("hostname", 514, "username", "root", "ls -al");
string data = rsh.Encoding.GetString(response);
Console.WriteLine(data);
[Visual Basic]
Private WithEvents rsh As Rsh
rsh = New Rsh
Dim response As Byte() = rsh.Execute("hostname", 514, "username", "root", "ls -al")
Dim data As String = rsh.Encoding.GetString(response)
Console.WriteLine(data)
Rsh Class | Jscape.Telnet Namespace | Rsh.Execute Overload List