Commit | Line | Data |
---|---|---|
3a442ca8 | 1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
a9c6ea3c | 2 | .\" All rights reserved. |
1fa17096 | 3 | .\" |
daacd5f0 | 4 | .\" %sccs.include.redist.man% |
1fa17096 | 5 | .\" |
daacd5f0 | 6 | .\" @(#)rsh.1 6.7 (Berkeley) %G% |
a9c6ea3c | 7 | .\" |
daacd5f0 | 8 | .TH RSH 1 "%Q" |
1fa17096 KM |
9 | .UC 5 |
10 | .SH NAME | |
11 | rsh \- remote shell | |
12 | .SH SYNOPSIS | |
3a442ca8 | 13 | .ft B |
744998ff | 14 | rsh [ \-Kdnx ] [ \-k realm ] [ \-l username ] host [ command ] |
3a442ca8 | 15 | .ft R |
1fa17096 KM |
16 | .SH DESCRIPTION |
17 | .I Rsh | |
3a442ca8 KB |
18 | executes |
19 | .I command | |
20 | on | |
21 | .IR host . | |
22 | .PP | |
1fa17096 KM |
23 | .I Rsh |
24 | copies its standard input to the remote command, the standard | |
25 | output of the remote command to its standard output, and the | |
26 | standard error of the remote command to its standard error. | |
27 | Interrupt, quit and terminate signals are propagated to the remote | |
3a442ca8 KB |
28 | command; |
29 | .I rsh | |
30 | normally terminates when the remote command does. | |
31 | The options are as follows: | |
32 | .TP | |
744998ff KB |
33 | \-K |
34 | The \-K option turns off all Kerberos authentication. | |
35 | .TP | |
3a442ca8 KB |
36 | \-d |
37 | The \-d option turns on socket debugging (using | |
38 | .IR setsockopt (2)) | |
39 | on the TCP sockets used for communication with the remote host. | |
40 | .TP | |
41 | \-k | |
42 | The \-k option causes | |
33fe1ab4 KF |
43 | .I rsh |
44 | to obtain tickets for the remote host in | |
45 | .I realm | |
46 | instead of the remote host's realm as determined by | |
47 | .IR krb_realmofhost (3). | |
3a442ca8 KB |
48 | .TP |
49 | \-l | |
50 | By default, the remote username is the same as the local username. | |
51 | The \-l option allows the remote name to be specified. | |
52 | Kerberos authentication is used, and authorization is determined | |
53 | as in | |
54 | .IR rlogin (1). | |
55 | .TP | |
56 | \-n | |
57 | The \-n option redirects input from the special device ``/dev/null'' | |
58 | (see the BUGS section of this manual page). | |
59 | .TP | |
60 | \-x | |
61 | The \-x option turns on DES encryption for all data exchange. | |
33fe1ab4 KF |
62 | This may introduce a significant delay in response time. |
63 | .PP | |
3a442ca8 KB |
64 | If no |
65 | .I command | |
66 | is specified, you will be logged in on the remote host using | |
d4e1bbc0 | 67 | .IR rlogin (1). |
1fa17096 | 68 | .PP |
3a442ca8 KB |
69 | Shell metacharacters which are not quoted are interpreted on local machine, |
70 | while quoted metacharacters are interpreted on the remote machine. | |
71 | For example, the command | |
72 | .sp | |
73 | .RS | |
74 | rsh otherhost cat remotefile >> localfile | |
75 | .RE | |
76 | .sp | |
1fa17096 KM |
77 | appends the remote file |
78 | .I remotefile | |
33fe1ab4 | 79 | to the local file |
1fa17096 KM |
80 | .I localfile, |
81 | while | |
3a442ca8 KB |
82 | .sp |
83 | .RS | |
84 | rsh otherhost cat remotefile ">>" other_remotefile | |
85 | .RE | |
86 | .sp | |
1fa17096 KM |
87 | appends |
88 | .I remotefile | |
89 | to | |
3a442ca8 | 90 | .I other_remotefile. |
1fa17096 | 91 | .PP |
3a442ca8 KB |
92 | Many sites specify a large number of host names as commands in the |
93 | directory /usr/hosts. | |
94 | If this directory is included in your search path, you can use the | |
95 | shorthand ``host command'' for the longer form ``rsh host command''. | |
1fa17096 | 96 | .SH FILES |
1fa17096 KM |
97 | /usr/hosts/* |
98 | .DT | |
99 | .SH SEE ALSO | |
33fe1ab4 | 100 | rlogin(1), kerberos(3), krb_sendauth(3), krb_realmofhost(3) |
1fa17096 KM |
101 | .SH BUGS |
102 | If you are using | |
103 | .IR csh (1) | |
104 | and put a | |
a9c6ea3c | 105 | .IR rsh (1) |
3a442ca8 KB |
106 | in the background without redirecting its input away from the terminal, |
107 | it will block even if no reads are posted by the remote command. | |
108 | If no input is desired you should redirect the input of | |
1fa17096 | 109 | .I rsh |
3a442ca8 | 110 | to /dev/null using the \-n option. |
1fa17096 KM |
111 | .PP |
112 | You cannot run an interactive command | |
113 | (like | |
114 | .IR rogue (6) | |
115 | or | |
3a442ca8 KB |
116 | .IR vi (1)) |
117 | using | |
118 | .IR rsh ; | |
1fa17096 | 119 | use |
3a442ca8 KB |
120 | .IR rlogin (1) |
121 | instead. | |
1fa17096 | 122 | .PP |
3a442ca8 KB |
123 | Stop signals stop the local |
124 | .I rsh | |
125 | process only; this is arguably wrong, but currently hard to fix for reasons | |
126 | too complicated to explain here. |