Creates a new Rexec instance.
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.
Rexec requires Remote Host authorization to execute the command. This is accomplished using a combination of two system files,
hosts.equivand
.rhosts, depending on your system. Consult your system documentation for more information about managing remote logins.
To use an Rexec instance, assign the hostname or IP address, username, password, and command properties of the Rexec instance. By default, Port 512 will be used.
[C#]
Rexec rexec = new Rexec();
rexec.Hostname = "hostname";
rexec.Username = "username";
rexec.Password = "password";
rexec.Command = "ls -al";
rexec.Execute();
[Visual Basic]
Private WithEvents rexec As Rexec
rexec = new Rexec()
rexec.Hostname = "hostname"
rexec.Username = "username"
rexec.Password = "password"
rexec.Command = "ls -al"
rexec.Execute()
Rexec Class | Jscape.Telnet Namespace | Rexec Constructor Overload List