Compartilhar via


3.1.4.1.31 Remote Shell

 There are two types of remote shell scenarios that can be created:

  1. Text-based Command Shell scenario

  2.  Custom Remote Shell scenario

Text-based Command Shell: The scenario mimics the pattern of operations of a user with the Windows cmd.exe interactive command Shell: opening the Shell, running a command in the form of simple text-based command-line, possibly feeding input streams, examining the output streams, running new commands, and finally closing the Shell. This scenario is limited to the Windows Command Shell only.

Custom Remote Shell: Unlike the Text-based Command Shell scenario, the Custom Remote Shell scenario allows the user to execute any Shell remotely. However, before the user tries to execute the custom Shell remotely, the administrator has to set up the configuration table at the server to map a specific custom Shell to corresponding resource URIs. This can be done in one of the following ways:

  • The administrator configures a new plugin on the server, which exposes a resource with the Shell capability.<86> For more details, see section 2.2.4.22.

  • The administrator can set up CustomRemoteShells as specified in section 3.1.1.<87> In this type of Custom Remote Shell, the "Command" request and response are not sent explicitly. Rather, in this scenario, the "Command", its arguments, and any associated data are sent as a BLOB in the "Send" request. This BLOB is Shell-specific and is transparent to the protocol. In case of Custom Remote Shell, the "Send" is targeted at the Shell itself, which decodes the BLOB.

The user then provides a resource URI that is mapped to a custom Shell and the server executes the Shell remotely on behalf of the user.

The processing sequence for creating and interacting with remote shells is defined in the following figure.

Each ReceiveResponse message can contain data from either stdout, stderr, or both streams (as specified in section 3.1.4.1.31.1). The order in which these elements appear in the ReceiveResponse message is determined by the data written by the Command and is implementation-dependent.

Web Services Management Protocol Extensions for the Windows Vista Remote Shell message processing sequence

Figure 7: Web Services Management Protocol Extensions for the Windows Vista Remote Shell message processing sequence