Introducing Remote Shell Control

Remote Shell Control

Introducing Remote Shell Control

Remote Shell Control lets you send user-defined commands to a remote host using either the RSH protocol or the REXEC protocol.

The rshctrl.ocx establishes a connection between the client machine and the server machine. Commands sent by the client machine through this connection can be executed on the server machine. Remote Shell Control returns the data to the client machine.

Note: 
  The client machine must have TCP/IP installed correctly because the RshCtrl is TCP/IP network-based. This also forces the control to use events to notify the client machine when the server has sent something back.

You can embed the control anywhere without worrying about its appearance because the control is invisible at runtime.

You need to supply the following properties before any client/server transaction can take place:

HostName

The name or IP address of the server machine.

RemoteUsername

The user account name to use on the server machine.

Command

The command to be sent.

RemotePassword (REXEC)

The remote password (SENT IN CLEARTEXT).

LocalUsername (RSH)

The username on the client machine.

Note: 
  Some required information depends upon the protocol you are using. For example, if you are using the REXEC protocol, you need the remote password. If you are using the RSH protocol, you need the local user name.

Use the AsyncStartCmd method after completing the required properties. At this point, a connection is established and the command is sent. As data returns from the server, the DataReady Event is generated.