stupid mistake in execl
[unix-history] / usr / src / usr.bin / rsh / rsh.1
... / ...
CommitLineData
1.\" $Source: /mit/kerberos/src/man/RCS/rsh.1,v $
2.\" $Author: jtkohl $
3.\" $Header: rsh.1,v 4.1 89/01/23 11:39:11 jtkohl Exp $
4.\"
5.\" Copyright (c) 1983 The Regents of the University of California.
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms are permitted
9.\" provided that the above copyright notice and this paragraph are
10.\" duplicated in all such forms and that any documentation,
11.\" advertising materials, and other materials related to such
12.\" distribution and use acknowledge that the software was developed
13.\" by the University of California, Berkeley. The name of the
14.\" University may not be used to endorse or promote products derived
15.\" from this software without specific prior written permission.
16.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19.\"
20.\" @(#)rsh.1 6.2 (Berkeley) 9/20/88
21.\"
22.TH RSH 1 "Kerberos Version 4.0" "MIT Project Athena"
23.UC 5
24.SH NAME
25rsh \- remote shell
26.SH SYNOPSIS
27.B rsh
28host
29[
30.B \-l
31username
32] [
33.B \-n
34] [
35.B \-x
36] [
37.B \-d
38] [
39.B \-k
40realm ] command
41.br
42host
43[
44.B \-l
45username
46] [
47.B \-n
48] [
49.B \-x
50] [
51.B \-d
52] [
53.B \-k
54realm ] command
55.SH DESCRIPTION
56.I Rsh
57connects to the specified
58.I host,
59and executes the specified \fIcommand\fR.
60.I Rsh
61copies its standard input to the remote command, the standard
62output of the remote command to its standard output, and the
63standard error of the remote command to its standard error.
64Interrupt, quit and terminate signals are propagated to the remote
65command; \fIrsh\fP normally terminates when the remote command does.
66.PP
67The remote username used is the same as your local username,
68unless you specify a different remote name with the
69.B \-l
70option.
71Kerberos authentication is used, and authorization is determined as in
72rlogin(1).
73.PP
74The
75.B \-k
76\fIrealm\fP option causes
77.I rsh
78to obtain tickets for the remote host in
79.I realm
80instead of the remote host's realm as determined by
81.IR krb_realmofhost (3).
82.PP
83The
84.B \-x
85option turns on DES encryption for all data exchange.
86This may introduce a significant delay in response time.
87.PP
88The
89.B \-d
90option turns on socket debugging (via \fIsetsockopt(2)\fR) on the TCP
91sockets used for communication with the remote host.
92.PP
93The
94.B \-n
95option redirects input from the special device
96.I /dev/null
97(see the BUGS section below).
98.PP
99If you omit
100.I command,
101then instead of executing a single command, you will be logged in
102on the remote host using
103.IR rlogin (1).
104.PP
105Shell metacharacters which are not quoted are interpreted
106on local machine, while quoted metacharacters are interpreted on
107the remote machine.
108Thus the command
109.PP
110\ \ \ rsh otherhost cat remotefile >> localfile
111.PP
112appends the remote file
113.I remotefile
114to the local file
115.I localfile,
116while
117.PP
118\ \ \ rsh otherhost cat remotefile ">>" otherremotefile
119.PP
120appends
121.I remotefile
122to
123.I otherremotefile.
124.PP
125The host names for local machines are also commands in the directory
126/usr/hosts; if you put this directory in your search path
127then the
128.B rsh
129on the command line can be omitted.
130.SH FILES
131.ta 2i
132/etc/hosts
133.br
134/usr/hosts/*
135.DT
136.SH SEE ALSO
137rlogin(1), kerberos(3), krb_sendauth(3), krb_realmofhost(3)
138.SH BUGS
139If you are using
140.IR csh (1)
141and put a
142.IR rsh (1)
143in the background without redirecting its input
144away from the terminal, it will block even if no reads
145are posted by the remote command. If no input is desired
146you should redirect the input of
147.I rsh
148to /dev/null using the
149.B \-n
150option.
151.PP
152You cannot run an interactive command
153(like
154.IR rogue (6)
155or
156.IR vi (1));
157use
158.IR rlogin (1).
159.PP
160Stop signals stop the local \fIrsh\fP process only; this is arguably
161wrong, but currently hard to fix for reasons too complicated to
162explain here.