1RSH(1C) RSH(1C)
2
3
4
6 rsh - remote shell
7
9 rsh host [ -l username ] [ -n ] command
10 host [ -l username ] [ -n ] command
11
13 Rsh connects to the specified host, and executes the specified command.
14 Rsh copies its standard input to the remote command, the standard out‐
15 put of the remote command to its standard output, and the standard
16 error of the remote command to its standard error. Interrupt, quit and
17 terminate signals are propagated to the remote command; rsh normally
18 terminates when the remote command does.
19
20 The remote username used is the same as your local username, unless you
21 specify a different remote name with the -l option. This remote name
22 must be equivalent (in the sense of rlogin(1C)) to the originating
23 account; no provision is made for specifying a password with a command.
24
25 If you omit command, then instead of executing a single command, you
26 will be logged in on the remote host using rlogin(1C).
27
28 Shell metacharacters which are not quoted are interpreted on local
29 machine, while quoted metacharacters are interpreted on the remote
30 machine. Thus the command
31
32 rsh otherhost cat remotefile >> localfile
33
34 appends the remote file remotefile to the localfile localfile, while
35
36 rsh otherhost cat remotefile ">>" otherremotefile
37
38 appends remotefile to otherremotefile.
39
40 Host names are given in the file /etc/hosts. Each host has one stan‐
41 dard name (the first name given in the file), which is rather long and
42 unambiguous, and optionally one or more nicknames. The host names for
43 local machines are also commands in the directory /usr/hosts; if you
44 put this directory in your search path then the rsh can be omitted.
45
47 /etc/hosts
48 /usr/hosts/*
49
51 rlogin(1C)
52
54 If you are using csh(1) and put a rsh(1C) in the background without
55 redirecting its input away from the terminal, it will block even if no
56 reads are posted by the remote command. If no input is desired you
57 should redirect the input of rsh to /dev/null using the -n option.
58
59 You cannot run an interactive command (like rogue(6) or vi(1)); use
60 rlogin(1C).
61
62 Stop signals stop the local rsh process only; this is arguably wrong,
63 but currently hard to fix for reasons too complicated to explain here.
64
65
66
674.2 Berkeley Distribution April 29, 1985 RSH(1C)