]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/rsh/rsh.1
mdoc(7) police: use the new features of the Nm macro.
[FreeBSD/FreeBSD.git] / usr.bin / rsh / 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.1 (Berkeley) 6/6/93
33 .\" $FreeBSD$
34 .\"
35 .Dd June 6, 1993
36 .Dt RSH 1
37 .Os BSD 4.2
38 .Sh NAME
39 .Nm rsh
40 .Nd remote shell
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl Kdnx
44 .Op Fl t Ar timeout
45 .Op Fl k Ar realm
46 .Op Fl l Ar username
47 .Ar host
48 .Op command
49 .Sh DESCRIPTION
50 .Nm Rsh
51 executes
52 .Ar command
53 on
54 .Ar host .
55 .Pp
56 .Nm Rsh
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;
62 .Nm
63 normally terminates when the remote command does.
64 The options are as follows:
65 .Bl -tag -width flag
66 .It Fl K
67 Turn off all Kerberos authentication.
68 .It Fl d
69 Turn on socket debugging (using
70 .Xr setsockopt 2 )
71 on the
72 .Tn TCP
73 sockets used for communication with the remote host.
74 .It Fl k Ar realm
75 Cause
76 .Nm
77 to obtain tickets for the remote host in
78 .Ar realm
79 instead of the remote host's realm as determined by
80 .Xr krb_realmofhost 3 .
81 .It Fl l Ar username
82 Allow the remote
83 .Ar username
84 to be specified.
85 By default, the remote username is the same as the local username.
86 Kerberos authentication is used, and authorization is determined
87 as in
88 .Xr rlogin 1 .
89 .It Fl n
90 Redirect input from the special device
91 .Pa /dev/null
92 (see the
93 .Sx BUGS
94 section of this manual page).
95 .It Fl x
96 Turn on
97 .Tn DES
98 encryption for all data exchange.
99 This may introduce a significant delay in response time.
100 .It Fl t Ar timeout
101 Allow a
102 .Ar timeout
103 to be specified (in seconds).  If no
104 data is sent or received in this time,
105 .Nm
106 will exit.
107 .El
108 .Pp
109 If no
110 .Ar command
111 is specified, you will be logged in on the remote host using
112 .Xr rlogin 1 .
113 .Pp
114 Shell metacharacters which are not quoted are interpreted on local machine,
115 while quoted metacharacters are interpreted on the remote machine.
116 For example, the command
117 .Pp
118 .Dl rsh otherhost cat remotefile >> localfile
119 .Pp
120 appends the remote file
121 .Ar remotefile
122 to the local file
123 .Ar localfile ,
124 while
125 .Pp
126 .Dl rsh otherhost cat remotefile \&">>\&" other_remotefile
127 .Pp
128 appends
129 .Ar remotefile
130 to
131 .Ar other_remotefile .
132 .\" .Pp
133 .\" Many sites specify a large number of host names as commands in the
134 .\" directory /usr/hosts.
135 .\" If this directory is included in your search path, you can use the
136 .\" shorthand ``host command'' for the longer form ``rsh host command''.
137 .Sh FILES
138 .Bl -tag -width /etc/hosts -compact
139 .It Pa /etc/hosts
140 .It Pa /etc/auth.conf
141 .El
142 .Sh SEE ALSO
143 .Xr rlogin 1 ,
144 .Xr setsockopt 2 ,
145 .Xr kerberos 3 ,
146 .Xr krb_realmofhost 3 ,
147 .Xr krb_sendauth 3 ,
148 .Xr rcmd 3 ,
149 .Xr ruserok 3 ,
150 .Xr auth.conf 5 ,
151 .Xr hosts.equiv 5 ,
152 .Xr hosts 5 ,
153 .Xr rlogind 8 ,
154 .Xr rshd 8
155 .Sh HISTORY
156 The
157 .Nm
158 command appeared in
159 .Bx 4.2 .
160 .Sh BUGS
161 If you are using
162 .Xr csh  1
163 and put a
164 .Nm
165 in the background without redirecting its input away from the terminal,
166 it will block even if no reads are posted by the remote command.
167 If no input is desired you should redirect the input of
168 .Nm
169 to
170 .Pa /dev/null
171 using the
172 .Fl n
173 option.
174 .Pp
175 You cannot run an interactive command
176 (like
177 .Xr rogue 6
178 or
179 .Xr vi 1 )
180 using
181 .Nm ;
182 use
183 .Xr rlogin 1
184 instead.
185 .Pp
186 Stop signals stop the local
187 .Nm
188 process only; this is arguably wrong, but currently hard to fix for reasons
189 too complicated to explain here.