xref: /netbsd-src/bin/rcmd/rcmd.1 (revision fdecd6a253f999ae92b139670d9e15cc9df4497c)
1.\"	$NetBSD: rcmd.1,v 1.4 1997/06/09 09:15:49 mrg Exp $
2.\"
3.\" Copyright (c) 1997 Matthew R. Green.
4.\" Copyright (c) 1983, 1990 The Regents of the University of California.
5.\" All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by the University of
18.\"	California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"	from: @(#)rsh.1	6.10 (Berkeley) 7/24/91
36.\"	from: NetBSD: rsh.1,v 1.3 1997/01/09 20:21:14 tls Exp
37.\"
38.Dd February 15, 1997
39.Dt RCMD 1
40.Os NetBSD
41.Sh NAME
42.Nm rcmd
43.Nd backend driver for
44.Xr rcmd 3 .
45.Sh SYNOPSIS
46.Nm rcmd
47.Op Fl Kdnx
48.Op Fl k Ar realm
49.Op Fl l Ar username
50.Op Fl u Ar localusername
51.Ar host
52.Ar command
53.Sh DESCRIPTION
54.Nm
55executes
56.Ar command
57on
58.Ar host  .
59.Pp
60.Nm Rcmd
61copies its standard input to the remote command, the standard
62output of the remote command to its standard output, and the
63standard error of the remote command to its standard error.
64Interrupt, quit and terminate signals are propagated to the remote
65command;
66.Nm
67normally terminates when the remote command does.
68The options are as follows:
69.Bl -tag -width flag
70.It Fl K
71The
72.Fl K
73option turns off all Kerberos authentication.
74.It Fl d
75The
76.Fl d
77option turns on socket debugging (using
78.Xr setsockopt  2  )
79on the
80.Tn TCP
81sockets used for communication with the remote host.
82.It Fl k
83The
84.Fl k
85option causes
86.Nm
87to obtain tickets for the remote host in
88.Ar realm
89instead of the remote host's realm as determined by
90.Xr krb_realmofhost  3  .
91.It Fl l
92By default, the remote username is the same as the local username.
93The
94.Fl l
95option allows the remote name to be specified.
96Kerberos authentication is used, and authorization is determined
97as in
98.Xr rlogin  1  .
99.It Fl u
100The
101.Fl u
102option allows the local username to be specified.  Only the superuser
103is allowed to use this option.
104.It Fl n
105The
106.Fl n
107option redirects input from the special device
108.Pa /dev/null
109(see the
110.Sx BUGS
111section of this manual page).
112.It Fl x
113The
114.Fl x
115option turns on
116.Tn DES
117encryption for all data exchange.
118This may introduce a significant delay in response time.
119.El
120.Pp
121.Pp
122Shell metacharacters which are not quoted are interpreted on local machine,
123while quoted metacharacters are interpreted on the remote machine.
124For example, the command
125.Pp
126.Dl rcmd otherhost cat remotefile >> localfile
127.Pp
128appends the remote file
129.Ar remotefile
130to the local file
131.Ar localfile ,
132while
133.Pp
134.Dl rcmd otherhost cat remotefile \&">>\&" other_remotefile
135.Pp
136appends
137.Ar remotefile
138to
139.Ar other_remotefile .
140.Sh FILES
141.Bl -tag -width /etc/hosts -compact
142.It Pa /etc/hosts
143.El
144.Sh SEE ALSO
145.Xr rsh 1 ,
146.Xr kerberos 3 ,
147.Xr krb_sendauth 3 ,
148.Xr krb_realmofhost 3
149.Sh HISTORY
150The
151.Nm
152command appeared in
153.Nx 1.3 .
154It is mostly derived from
155.Xr rsh 1 .
156It's purpose was to create a backend driver for
157.Xr rcmd 3
158that would allow the users of
159.Xr rcmd 3
160to no longer require super-user privileges.
161.Sh BUGS
162If you are using
163.Xr csh  1
164and put a
165.Nm
166in the background without redirecting its input away from the terminal,
167it will block even if no reads are posted by the remote command.
168If no input is desired you should redirect the input of
169.Nm
170to
171.Pa /dev/null
172using the
173.Fl n
174option.
175.Pp
176You cannot run an interactive command
177(like
178.Xr rogue  6
179or
180.Xr vi  1  )
181using
182.Nm
183use
184.Xr rlogin  1
185instead.
186.Pp
187Stop signals stop the local
188.Nm
189process only; this is arguably wrong, but currently hard to fix for reasons
190too complicated to explain here.
191