summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/appl/rsh/rsh.1
blob: 82c1f6c1f0f8c777099690b34040ccd6b050df25 (plain)
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
.\" Copyright (c) 2002 - 2003 Kungliga Tekniska Högskolan
.\" (Royal Institute of Technology, Stockholm, Sweden). 
.\" 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. Neither the name of the Institute 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 INSTITUTE 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 INSTITUTE 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. 
.\" 
.\"	$Id: rsh.1,v 1.6 2003/04/16 19:57:25 lha Exp $
.\"
.Dd September 4, 2002
.Dt RSH 1
.Os HEIMDAL
.Sh NAME
.Nm rsh
.Nd
remote shell
.Sh SYNOPSIS
.Nm
.Op Fl 45FGKdefnuxz
.Op Fl U Pa string
.Op Fl p Ar port
.Op Fl l Ar username
.Op Fl P Ar N|O
.Ar host [command]
.Sh DESCRIPTION
.Nm
authenticates to the
.Xr rshd 8
daemon on the remote
.Ar host ,
and then executes the specified
.Ar command .
.Pp
.Nm
copies its standard input to the remote command, and the standard
output and error of the remote command to its own.
.Pp
Valid options are:
.Bl -tag -width Ds
.It Xo
.Fl 4 ,
.Fl -krb4
.Xc
The
.Fl 4
option requests Kerberos 4 authentication. Normally all supported
authentication mechanisms will be tried, but in some cases more
explicit control is desired.
.It Xo
.Fl 5 ,
.Fl -krb5
.Xc
The
.Fl 5
option requests Kerberos 5 authentication. This is analogous to the
.Fl 4
option.
.It Xo
.Fl K ,
.Fl -broken
.Xc
The
.Fl K
option turns off all Kerberos authentication. The long name implies
that this is more or less totally unsecure. The security in this mode
relies on reserved ports, which is not very secure.
.It Xo
.Fl n ,
.Fl -no-input
.Xc
The
.Fl n
option directs the input from the
.Pa /dev/null
device (see the
.Sx BUGS
section of this manual page).
.It Xo
.Fl e ,
.Fl -no-stderr
.Xc
Don't use a separate socket for the stderr stream. This can be
necessary if rsh-ing through a NAT bridge.
.It Xo
.Fl x ,
.Fl -encrypt
.Xc
The
.Fl x
option enables encryption for all data exchange. This is only valid
for Kerberos authenticated connections (see the
.Sx BUGS
section for limitations).
.It Xo
.Fl z
.Xc
The opposite of
.Fl x .
This is the default, but encryption can be enabled when using
Kerberos 5, by setting the
.Li libdefaults/encrypt
option in
.Xr krb5.conf 5 .
.It Xo
.Fl f ,
.Fl -forward
.Xc
Forward Kerberos 5 credentials to the remote host. Also controlled by
.Li libdefaults/forward
in
.Xr krb5.conf 5 .
.It Xo
.Fl G
.Xc
The opposite of
.Fl f .
.It Xo
.Fl F ,
.Fl -forwardable
.Xc
Make the forwarded credentials re-forwardable. Also controlled by
.Li libdefaults/forwardable
in
.Xr krb5.conf 5 .
.It Xo
.Fl u ,
.Fl -unique
.Xc
Make sure the remote credentials cache is unique, that is, don't reuse
any existing cache. Mutually exclusive to
.Fl U .
.It Xo
.Fl U Pa string ,
.Fl -tkfile= Ns Pa string
.Xc
Name of the remote credentials cache. Mutually exclusive to
.Fl u .
.It Xo
.Fl p Ar number-or-service ,
.Fl -port= Ns Ar number-or-service
.Xc
Connect to this port instead of the default (which is 514 when using
old port based authentication, 544 for Kerberos 5 and non-encrypted
Kerberos 4, and 545 for encrytpted Kerberos 4; subject of course to
the contents of
.Pa /etc/services ) .
.It Xo
.Fl l Ar string ,
.Fl -user= Ns Ar string
.Xc
By default the remote username is the same as the local. The
.Fl l
option or the
.Pa username@host
format allow the remote name to be specified.
.It Xo
.Fl P Ar N|O|1|2 ,
.Fl -protocol= Ns Ar N|O|1|2
.Xc
Specifies which protocol version to use with Kerberos 5.
.Ar N
and
.Ar 2
selects protocol version 2, while 
.Ar O
and
.Ar 1
selects version 1. Version 2 is believed to be more secure, and is the
default. Unless asked for a specific version,
.Nm
will try both.  This behaviour may change in the future.
.El
.\".Pp
.\"Without a
.\".Ar command
.\".Nm
.\"will just exec
.\".Xr rlogin 1
.\"with the same arguments.
.Sh EXAMPLES
Care should be taken when issuing commands containing shell meta
characters. Without quoting, these will be expanded on the local
machine.
.Pp
The following command:
.Pp
.Dl rsh otherhost cat remotefile > localfile
.Pp
will write the contents of the remote
.Pa remotefile
to the local
.Pa localfile ,
but:
.Pp
.Dl rsh otherhost 'cat remotefile > remotefile2'
.Pp
will write it to the remote
.Pa remotefile2 .
.\".Sh ENVIRONMENT
.Sh FILES
.Bl -tag -width /etc/hosts -compact
.It Pa /etc/hosts
.El
.\".Sh DIAGNOSTICS
.Sh SEE ALSO
.Xr rlogin 1 ,
.Xr krb_realmofhost 3 ,
.Xr krb_sendauth 3 ,
.Xr hosts.equiv 5 ,
.Xr krb5.conf 5 ,
.Xr rhosts 5 ,
.Xr kerberos 8
.Xr rshd 8
.\".Sh STANDARDS
.Sh HISTORY
The
.Nm
command appeared in
.Bx 4.2 .
.Sh AUTHORS
This implementation of
.Nm
was written as part of the Heimdal Kerberos 5 implementation.
.Sh BUGS
Some shells (notably
.Xr csh 1 )
will cause
.Nm
to block if run in the background, unless the standard input is directed away from the terminal. This is what the
.Fl n
option is for.
.Pp
The
.Fl x
options enables encryption for the session, but for both Kerberos 4
and 5 the actual command is sent unencrypted, so you should not send
any secret information in the command line (which is probably a bad
idea anyway, since the command line can usually be read with tools
like
.Xr ps 1 ) .
Forthermore in Kerberos 4 the command is not even integrity
protected, so anyone with the right tools can modify the command.
OpenPOWER on IntegriCloud