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