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