Commit | Line | Data |
---|---|---|
2a9f391e C |
1 | .TH RSH 1C "17 March 1982" |
2 | .UC 4 | |
3 | .SH NAME | |
4 | rsh \- remote shell | |
5 | .SH SYNOPSIS | |
6 | .B rsh | |
7 | host | |
8 | [ | |
9 | .B \-l | |
10 | username | |
11 | ] [ | |
12 | .B \-n | |
13 | ] command | |
14 | .br | |
15 | host | |
16 | [ | |
17 | .B \-l | |
18 | username | |
19 | ] [ | |
20 | .B \-n | |
21 | ] command | |
22 | .SH DESCRIPTION | |
23 | .I Rsh | |
24 | connects to the specified | |
25 | .I host, | |
26 | and executes the specified \fIcommand\fR. | |
27 | .I Rsh | |
28 | copies its standard input to the remote command, the standard | |
29 | output of the remote command to its standard output, and the | |
30 | standard error of the remote command to its standard error. | |
31 | Interrupt, quit and terminate signals are propagated to the remote | |
32 | command; \fIrsh\fP normally terminates when the remote command does. | |
33 | .PP | |
34 | The remote username used is the same as your local username, | |
35 | unless you specify a different remote name with the | |
36 | .B \-l | |
37 | option. | |
38 | This remote name must be equivalent (in the sense of | |
39 | .IR rlogin (1C)) | |
40 | to the originating account; no provision | |
41 | is made for specifying a password with a command. | |
42 | .PP | |
43 | If you omit | |
44 | .I command, | |
45 | then instead of executing a single command, you will be logged in | |
46 | on the remote host using | |
47 | .IR rlogin (1C). | |
48 | .PP | |
49 | Shell metacharacters which are not quoted are interpreted | |
50 | on local machine, while quoted metacharacters are interpreted on | |
51 | the remote machine. | |
52 | Thus the command | |
53 | .PP | |
54 | \ \ \ rsh otherhost cat remotefile >> localfile | |
55 | .PP | |
56 | appends the remote file | |
57 | .I remotefile | |
58 | to the localfile | |
59 | .I localfile, | |
60 | while | |
61 | .PP | |
62 | \ \ \ rsh otherhost cat remotefile ">>" otherremotefile | |
63 | .PP | |
64 | appends | |
65 | .I remotefile | |
66 | to | |
67 | .I otherremotefile. | |
68 | .PP | |
69 | Host names are given in the file /etc/hosts. Each host | |
70 | has one standard name (the first name given in the file), which | |
71 | is rather long and unambiguous, and optionally one or more nicknames. | |
72 | The host names for local machines are also commands in the directory | |
73 | /usr/hosts; if you put this directory in your search path | |
74 | then the | |
75 | .B rsh | |
76 | can be omitted. | |
77 | .SH FILES | |
78 | .ta 2i | |
79 | /etc/hosts | |
80 | .br | |
81 | /usr/hosts/* | |
82 | .DT | |
83 | .SH SEE ALSO | |
84 | rlogin(1C) | |
85 | .SH BUGS | |
86 | If you are using | |
87 | .IR csh (1) | |
88 | and put a | |
89 | .IR rsh (1C) | |
90 | in the background without redirecting its input | |
91 | away from the terminal, it will block even if no reads | |
92 | are posted by the remote command. If no input is desired | |
93 | you should redirect the input of | |
94 | .I rsh | |
95 | to /dev/null using the | |
96 | .B \-n | |
97 | option. | |
98 | .PP | |
99 | You cannot run an interactive command | |
100 | (like | |
101 | .IR rogue (6) | |
102 | or | |
103 | .IR vi (1)); | |
104 | use | |
105 | .IR rlogin (1C). | |
106 | .PP | |
107 | Stop signals stop the local \fIrsh\fP process only; this is arguably | |
108 | wrong, but currently hard to fix for reasons too complicated to | |
109 | explain here. |