Dart.Emulation Namespace > Rexec Class : Execute Method |
Public Sub Execute( _ ByVal username As String, _ ByVal password As String, _ ByVal command As String _ )
Use the Connect method to first connect to the remote host on the well-known port of 512. Then use Execute to authenticate using username and password and execute the command specified by command.
Use one of the Read methods to get the server's output.
When the server responds to a REXEC command, the first byte received indicates success/failure (0 for success, 1 for failure). When using the Rexec component, if the first byte is a 1 (meaning failure) an IOException is thrown. The Exception.Message will contain the response from the server without the first byte.