Creates a new Rsh instance.

Namespace: Jscape.Telnet
Assembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0

Syntax

C#
public Rsh()
Visual Basic
Public Sub New
Visual C++
public:
Rsh()

Remarks

Note: Some systems limit the username to eight (8) characters or less. The Telnet Factory for .NET implementation does not restrict the length of usernames. If you have difficulty logging in to a Remote Host using a non-truncated username, try using the username truncated to 8 characters.

Rsh requires Remote Host authorization to execute the command. This is accomplished using a combination of two system files, hosts.equiv and .rhosts, depending on your system. Consult your system documentation for more information about managing remote logins.

Examples

This example returns the results of a directory listing command executed on the Remote Host. Substitute a valid Remote Host and user for the hostname and username parameters.
CopyRsh
Rsh rsh = new Rsh();
byte[] response  = rsh.Execute("hostname", "username", "ls -al");
string data = rsh.Encoding.GetString(response);
Console.WriteLine(data);

CopyRsh
Private WithEvents rsh As Rsh
rsh = New Rsh
Dim response As Byte() = rsh.Execute("hostname", "username", "ls -al")
Dim data As String = rsh.Encoding.GetString(response)
Console.WriteLine(data)

See Also