remove gcc34
[dragonfly.git] / crypto / heimdal-0.6.3 / appl / rsh / rsh.1
1 .\" Copyright (c) 2002 - 2003 Kungliga Tekniska Högskolan
2 .\" (Royal Institute of Technology, Stockholm, Sweden). 
3 .\" All rights reserved. 
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without 
6 .\" modification, are permitted provided that the following conditions 
7 .\" are met: 
8 .\"
9 .\" 1. Redistributions of source code must retain the above copyright 
10 .\"    notice, this list of conditions and the following disclaimer. 
11 .\"
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 .\"
16 .\" 3. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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 .\"     $Id: rsh.1,v 1.6 2003/04/16 19:57:25 lha Exp $
33 .\"
34 .Dd September 4, 2002
35 .Dt RSH 1
36 .Os HEIMDAL
37 .Sh NAME
38 .Nm rsh
39 .Nd
40 remote shell
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl 45FGKdefnuxz
44 .Op Fl U Pa string
45 .Op Fl p Ar port
46 .Op Fl l Ar username
47 .Op Fl P Ar N|O
48 .Ar host [command]
49 .Sh DESCRIPTION
50 .Nm
51 authenticates to the
52 .Xr rshd 8
53 daemon on the remote
54 .Ar host ,
55 and then executes the specified
56 .Ar command .
57 .Pp
58 .Nm
59 copies its standard input to the remote command, and the standard
60 output and error of the remote command to its own.
61 .Pp
62 Valid options are:
63 .Bl -tag -width Ds
64 .It Xo
65 .Fl 4 ,
66 .Fl -krb4
67 .Xc
68 The
69 .Fl 4
70 option requests Kerberos 4 authentication. Normally all supported
71 authentication mechanisms will be tried, but in some cases more
72 explicit control is desired.
73 .It Xo
74 .Fl 5 ,
75 .Fl -krb5
76 .Xc
77 The
78 .Fl 5
79 option requests Kerberos 5 authentication. This is analogous to the
80 .Fl 4
81 option.
82 .It Xo
83 .Fl K ,
84 .Fl -broken
85 .Xc
86 The
87 .Fl K
88 option turns off all Kerberos authentication. The long name implies
89 that this is more or less totally unsecure. The security in this mode
90 relies on reserved ports, which is not very secure.
91 .It Xo
92 .Fl n ,
93 .Fl -no-input
94 .Xc
95 The
96 .Fl n
97 option directs the input from the
98 .Pa /dev/null
99 device (see the
100 .Sx BUGS
101 section of this manual page).
102 .It Xo
103 .Fl e ,
104 .Fl -no-stderr
105 .Xc
106 Don't use a separate socket for the stderr stream. This can be
107 necessary if rsh-ing through a NAT bridge.
108 .It Xo
109 .Fl x ,
110 .Fl -encrypt
111 .Xc
112 The
113 .Fl x
114 option enables encryption for all data exchange. This is only valid
115 for Kerberos authenticated connections (see the
116 .Sx BUGS
117 section for limitations).
118 .It Xo
119 .Fl z
120 .Xc
121 The opposite of
122 .Fl x .
123 This is the default, but encryption can be enabled when using
124 Kerberos 5, by setting the
125 .Li libdefaults/encrypt
126 option in
127 .Xr krb5.conf 5 .
128 .It Xo
129 .Fl f ,
130 .Fl -forward
131 .Xc
132 Forward Kerberos 5 credentials to the remote host. Also controlled by
133 .Li libdefaults/forward
134 in
135 .Xr krb5.conf 5 .
136 .It Xo
137 .Fl G
138 .Xc
139 The opposite of
140 .Fl f .
141 .It Xo
142 .Fl F ,
143 .Fl -forwardable
144 .Xc
145 Make the forwarded credentials re-forwardable. Also controlled by
146 .Li libdefaults/forwardable
147 in
148 .Xr krb5.conf 5 .
149 .It Xo
150 .Fl u ,
151 .Fl -unique
152 .Xc
153 Make sure the remote credentials cache is unique, that is, don't reuse
154 any existing cache. Mutually exclusive to
155 .Fl U .
156 .It Xo
157 .Fl U Pa string ,
158 .Fl -tkfile= Ns Pa string
159 .Xc
160 Name of the remote credentials cache. Mutually exclusive to
161 .Fl u .
162 .It Xo
163 .Fl p Ar number-or-service ,
164 .Fl -port= Ns Ar number-or-service
165 .Xc
166 Connect to this port instead of the default (which is 514 when using
167 old port based authentication, 544 for Kerberos 5 and non-encrypted
168 Kerberos 4, and 545 for encrytpted Kerberos 4; subject of course to
169 the contents of
170 .Pa /etc/services ) .
171 .It Xo
172 .Fl l Ar string ,
173 .Fl -user= Ns Ar string
174 .Xc
175 By default the remote username is the same as the local. The
176 .Fl l
177 option or the
178 .Pa username@host
179 format allow the remote name to be specified.
180 .It Xo
181 .Fl P Ar N|O|1|2 ,
182 .Fl -protocol= Ns Ar N|O|1|2
183 .Xc
184 Specifies which protocol version to use with Kerberos 5.
185 .Ar N
186 and
187 .Ar 2
188 selects protocol version 2, while 
189 .Ar O
190 and
191 .Ar 1
192 selects version 1. Version 2 is believed to be more secure, and is the
193 default. Unless asked for a specific version,
194 .Nm
195 will try both.  This behaviour may change in the future.
196 .El
197 .\".Pp
198 .\"Without a
199 .\".Ar command
200 .\".Nm
201 .\"will just exec
202 .\".Xr rlogin 1
203 .\"with the same arguments.
204 .Sh EXAMPLES
205 Care should be taken when issuing commands containing shell meta
206 characters. Without quoting, these will be expanded on the local
207 machine.
208 .Pp
209 The following command:
210 .Pp
211 .Dl rsh otherhost cat remotefile > localfile
212 .Pp
213 will write the contents of the remote
214 .Pa remotefile
215 to the local
216 .Pa localfile ,
217 but:
218 .Pp
219 .Dl rsh otherhost 'cat remotefile > remotefile2'
220 .Pp
221 will write it to the remote
222 .Pa remotefile2 .
223 .\".Sh ENVIRONMENT
224 .Sh FILES
225 .Bl -tag -width /etc/hosts -compact
226 .It Pa /etc/hosts
227 .El
228 .\".Sh DIAGNOSTICS
229 .Sh SEE ALSO
230 .Xr rlogin 1 ,
231 .Xr krb_realmofhost 3 ,
232 .Xr krb_sendauth 3 ,
233 .Xr hosts.equiv 5 ,
234 .Xr krb5.conf 5 ,
235 .Xr rhosts 5 ,
236 .Xr kerberos 8
237 .Xr rshd 8
238 .\".Sh STANDARDS
239 .Sh HISTORY
240 The
241 .Nm
242 command appeared in
243 .Bx 4.2 .
244 .Sh AUTHORS
245 This implementation of
246 .Nm
247 was written as part of the Heimdal Kerberos 5 implementation.
248 .Sh BUGS
249 Some shells (notably
250 .Xr csh 1 )
251 will cause
252 .Nm
253 to block if run in the background, unless the standard input is directed away from the terminal. This is what the
254 .Fl n
255 option is for.
256 .Pp
257 The
258 .Fl x
259 options enables encryption for the session, but for both Kerberos 4
260 and 5 the actual command is sent unencrypted, so you should not send
261 any secret information in the command line (which is probably a bad
262 idea anyway, since the command line can usually be read with tools
263 like
264 .Xr ps 1 ) .
265 Forthermore in Kerberos 4 the command is not even integrity
266 protected, so anyone with the right tools can modify the command.