File: rexec.1

package info (click to toggle)
rexec 1.4-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 60 kB
  • ctags: 29
  • sloc: ansic: 357; makefile: 62
file content (179 lines) | stat: -rw-r--r-- 6,170 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
.\" Copyright (c) 1996 Michael Sadd (sadd@cornell.edu)
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"
.TH REXEC 1 "February 14, 1997"
.SH NAME
rexec \-\- remote execution client for an exec server
.SH SYNOPSIS
.B rexec 
[  
.B \-abcdhns \-l 
username 
.B \-p 
password
] host command
.SH DESCRIPTION
.B Rexec
calls the 
.B rexec(3)
routine to act as a client for the remote host's
.B rexecd(8)
server.  
.PP
It asks that ``command'' be run on the host computer,
using username/password authentication. See 
.B rexec(3)
and
.B rexecd(8)
for details of the protocol.
.SH OPTIONS
.B Rexec
accepts several options, but only three are likely to be very useful:
.\"
.LP
\fB\-l username\fP
.IP
Set the log-in name on the remote host to username.
.\"
.LP
\fB\-p password\fP
.IP
Provide the password for the remote account.  The command line argument
will be blanked after being parsed, to prevent it from being
seen with 
.B ps(1).
However, it is still not very secure to type the password on the 
command line.  In particular, be sure that the shell's history file
is protected.
.TP
\fB\-n\fP
Explicitly prompt for name and password, even if provided in
the environment, in the $HOME/.netrc file, or in the environmental
variables REXEC_USER and REXEC_PASS.
.PP
Other options that might be useful with non-standard remote exec
daemons, or to debug connections:
.TP
\fB\-a\fP
Do not set up an auxiliary channel for standard error from command;
the remote standard error and output are then both returned on the
local standard output.  By default, 
.B rexec
asks that a separate channel be set up for diagnostic output
from the remote command.
.TP
\fB\-b\fP
Use signal handling as in BSD rsh(1).  Only the signals 
SIGINT, SIGQUIT, and SIGTERM are echoed to the remote process.
They do not remain raised locally, so rexec waits for the
remote command to shutdown its side of the socket.  Also, CNTRL-Z will
only suspend execution locally--the remote command may continue to run.
.TP
\fB\-c\fP
Do not close remote standard input when local standard input closes.
Normally the standard input to the remote command is closed when
the local standard input is closed.
.TP
\fB\-d\fP
Turn on debugging information. In particular the command sent to the
remote host will be echoed.
.TP
\fB\-h\fP
Print a usage message.
.TP
\fB\-s\fP
Do not echo signals received by the rexec onto the remote
process.  Normally, signals which can be trapped are passed
on to the remote process; then, when you type CNTRL-C, the remote
process terminates as well.
.SH USERNAME AND PASSWORD
.B Rexec(1)
searches for the username and password in the following order:
.IP
1. If -n is given on the command line, the user will always be
prompted for both, even if they are also given on the command line.
.IP
2. The command line will be parsed
.IP
3. If the environmental variables REXEC_USER or REXEC_PASS are
defined, they will define the username or password.
.IP
4. The $HOME/.netrc file will be searched.  See
.B ftp(1)
for a description of this file's format.
.IP
5. Finally, the user will be prompted if either the username or password 
remains undefined.

.SH SECURITY
Users of this command should be aware that 
.B rexec(3)
transmits their password to the remote host clear text, not
encrypted.  If the network is not secure to the remote host, the
password can be comprimised.

.SH SIGNALS
Without the -b option,
all signals which can be handled are echoed to the remote process.
Afterwards, however, they remain raised in the local process.  
Typically, this means that 
.B rexec(1)
will exit after receiving a fatal signal, even if the remote
process has arranged to handle or ignore it.

Differing operating systems use differing signal numbers; for example
AIX and SunOS use 18 for SIGTSTP (^Z), while Linux uses 20.  Therefore, 
it may have a different effect remotely than
locally.  In particular, typing CNTL-Z may not suspend the execution
of the remote process.
.SH EXAMPLE
.PP
rexec othermachine cat ">remote_file; date" <local_file
.PP
will send local_file to the othermachine as remote_file.

.SH BUGS
.PP
Please send bug reports, system incompatibilities,
and job offers to the author.
.SH "SEE ALSO"
rexec(3), rexecd(8), rsh(1)
.SH AUTHOR
.PP
Michael Sadd 
.br
sadd@msc.cornell.edu
.br
http://www.msc.cornell.edu/~sadd/

Thanks to Orange Gopher (2/10/97) and Johannes Plass
(plass@dipmza.physik.uni-mainz.de, Oct. 17 1996) for useful suggestions.