Telnet Factory for .NET

Rexec Constructor (String, Int32, String, String, String)

Creates a new Rexec instance.

public Rexec(
   string hostname,
   int port,
   string username,
   string password,
   string command
);

Parameters

hostname
The hostname or IP address of the Remote Host.
port
The Remote Host port number. By default port 512 is used.
username
The username for the Remote Host.
password
The password to log into the Remote Host.
command
The command to execute on the Remote Host.

Example

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.

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

[Visual Basic]
rexec = new Rexec("hostname", 512, "username", "password", "ls -al")

See Also

Rexec Class | Jscape.Telnet Namespace | Rexec Constructor Overload List