rexec - Run remote command

Synopsis

rexec [-C ccsid ] [-p password] [-u user] [-i] host command

Description

The rexec utility runs the specified command on the remote system specified by host. The remote system must be running a rexec server to process the commands. By default, rexec prompts for a valid user name and password for the remote system. The user name and password are not encyrpted when they are sent to the remote system.

The standard output and standard error generated by command on the remote system are written to standard output and standard error on the local system. Any data read from standard input on the local system is sent to standard input for the command running on the remote system if the -i option is not specified.

By default, the data sent to and from the remote system is encoded in CCSID 819. The CCSID used to encode the data can be specified with either the -C option or the QIBM_CCSID variable. If the CCSID value is 65535, then no conversion is done on the data.

Options

-C ccsid
Encode the data sent to and from the remote system in the specified ccsid. This option overrides the value of the QIBM_CCSID environment variable.
-i
Ignore standard input on the local system.
-p password
The password for the user on host.
-u user
A valid user name on host.

Operands

The host is the name of the remote system where the command is run. The command is a command string that is interpreted by the rexec server running on the remote system.

Environment Variables

rexec uses the following environment variables:
QIBM_CCSID
The value of the variable is the CCSID to use to encode the data sent to and from the remote system.

Exit status

  • 0 when successful
  • >0 when unsuccessful