Creates a new Rexec instance.
Namespace: Jscape.TelnetAssembly: Jscape.Telnet (in Jscape.Telnet.dll) Version: 2.6.1.0
Syntax
C# |
---|
public Rexec( string hostname, int port, string username, string password, string command ) |
Visual Basic |
---|
Public Sub New ( _ hostname As String, _ port As Integer, _ username As String, _ password As String, _ command As String _ ) |
Visual C++ |
---|
public: Rexec( String^ hostname, int port, String^ username, String^ password, String^ command ) |
Parameters
- hostname
- Type: System..::..String
The hostname or IP address of the Remote Host.
- port
- Type: System..::..Int32
The Remote Host port number. By default port 512 is used.
- username
- Type: System..::..String
The username for the Remote Host.
- password
- Type: System..::..String
The password to log into the Remote Host.
- command
- Type: System..::..String
The command to execute on the Remote Host.
Examples
To create an Rexec instance, pass the hostname or IP address, port, username,
password, and command as arguments to the constructor. By default, Port 512
will be used.
CopyRexec
CopyRexec

Rexec rexec = new Rexec("hostname", 512, "username", "password", "ls -al");

rexec = new Rexec("hostname", 512, "username", "password", "ls -al")