1REXEC(1)                    General Commands Manual                   REXEC(1)
2
3
4

NAME

6       rexec -- remote execution client for an exec server
7

SYNOPSIS

9       rexec [ -abcdhns -l username -p password ] host command
10

DESCRIPTION

12       Rexec  calls  the  rexec(3)  routine  to act as a client for the remote
13       host's rexecd(8) server.
14
15       It asks that ``command'' be run  on  the  host  computer,  using  user‐
16       name/password authentication. See rexec(3) and rexecd(8) for details of
17       the protocol.
18

OPTIONS

20       Rexec accepts several options, but only three are  likely  to  be  very
21       useful:
22
23       -l username
24
25              Set the log-in name on the remote host to username.
26
27       -p password
28
29              Provide  the  password for the remote account.  The command line
30              argument will be blanked after being parsed, to prevent it  from
31              being  seen with ps(1).  However, it is still not very secure to
32              type the password on the command line.  In particular,  be  sure
33              that the shell's history file is protected.
34
35       -n     Explicitly prompt for name and password, even if provided in the
36              environment, in the $HOME/.netrc file, or in  the  environmental
37              variables REXEC_USER and REXEC_PASS.
38
39       Other  options  that might be useful with non-standard remote exec dae‐
40       mons, or to debug connections:
41
42       -a     Do not set up an auxiliary channel for standard error from  com‐
43              mand;  the  remote  standard  error  and  output  are  then both
44              returned on the local standard output.  By default,  rexec  asks
45              that a separate channel be set up for diagnostic output from the
46              remote command.
47
48       -b     Use signal handling as in BSD rsh(1).  Only the signals  SIGINT,
49              SIGQUIT,  and SIGTERM are echoed to the remote process.  They do
50              not remain raised locally, so rexec waits for the remote command
51              to  shutdown  its  side  of the socket.  Also, CNTRL-Z will only
52              suspend execution locally--the remote command  may  continue  to
53              run.
54
55       -c     Do  not  close  remote  standard input when local standard input
56              closes.  Normally the standard input to the  remote  command  is
57              closed when the local standard input is closed.
58
59       -d     Turn on debugging information. In particular the command sent to
60              the remote host will be echoed.
61
62       -h     Print a usage message.
63
64       -s     Do not echo signals  received  by  the  rexec  onto  the  remote
65              process.   Normally,  signals which can be trapped are passed on
66              to the remote process; then, when you type CNTRL-C,  the  remote
67              process terminates as well.
68

USERNAME AND PASSWORD

70       Rexec(1) searches for the username and password in the following order:
71
72              1.  If  -n is given on the command line, the user will always be
73              prompted for both, even if they are also given  on  the  command
74              line.
75
76              2. The command line will be parsed
77
78              3.  If  the environmental variables REXEC_USER or REXEC_PASS are
79              defined, they will define the username or password.
80
81              4. The $HOME/.netrc file will be searched.   See  ftp(1)  for  a
82              description of this file's format.
83
84              5.  Finally, the user will be prompted if either the username or
85              password remains undefined.
86
87

SECURITY

89       Users of this command should be aware  that  rexec(3)  transmits  their
90       password  to the remote host clear text, not encrypted.  If the network
91       is not secure to the remote host, the password can be comprimised.
92
93

SIGNALS

95       Without the -b option, all signals which can be handled are  echoed  to
96       the  remote  process.   Afterwards,  however, they remain raised in the
97       local process.  Typically, this means that  rexec(1)  will  exit  after
98       receiving  a  fatal  signal, even if the remote process has arranged to
99       handle or ignore it.
100
101       Differing operating systems use differing signal numbers;  for  example
102       AIX and SunOS use 18 for SIGTSTP (^Z), while Linux uses 20.  Therefore,
103       it may have a different effect remotely than locally.   In  particular,
104       typing CNTL-Z may not suspend the execution of the remote process.
105

EXAMPLE

107       rexec othermachine cat ">remote_file; date" <local_file
108
109       will send local_file to the othermachine as remote_file.
110
111

BUGS

113       Please  send  bug  reports, system incompatibilities, and job offers to
114       the author.
115

SEE ALSO

117       rexec(3), rexecd(8), rsh(1)
118

AUTHOR

120       Michael Sadd
121       mas22@cornell.edu
122       http://www.tc.cornell.edu/~sadd/
123
124       Thanks to  Orange  Gopher  (2/10/97)  and  Johannes  Plass  (plass@dip‐
125       mza.physik.uni-mainz.de, Oct. 17 1996) for useful suggestions.
126
127
128
129                               February 14, 1997                      REXEC(1)
Impressum