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