Telnet Factory for .NET

Rexec Constructor (String, String, String, String)

Creates a new Rexec instance.

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

Parameters

hostname
The hostname or IP address of the Remote Host.
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, username, password, and command as arguments to the constructor. By default, Port 512 will be used.

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

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

See Also

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