Implements the functionality of an Rsh client.
Namespace: Jscape.TelnetAssembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0
Syntax
C# |
---|
[SerializableAttribute] public class Rsh : Component |
Visual Basic |
---|
<SerializableAttribute> _ Public Class Rsh _ Inherits Component |
Visual C++ |
---|
[SerializableAttribute] public ref class Rsh : public Component |
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
CopyRsh

Rsh rsh = new Rsh(); byte[] response = rsh.Execute("hostname", "username", "ls -al"); string data = rsh.Encoding.GetString(response); Console.WriteLine(data);

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)
Inheritance Hierarchy
System..::..Object
System..::..MarshalByRefObject
System.ComponentModel..::..Component
Jscape.Telnet..::..Rsh
System..::..MarshalByRefObject
System.ComponentModel..::..Component
Jscape.Telnet..::..Rsh