Commit | Line | Data |
---|---|---|
3a442ca8 | 1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
a9c6ea3c | 2 | .\" All rights reserved. |
1fa17096 | 3 | .\" |
1c15e888 C |
4 | .\" Redistribution and use in source and binary forms are permitted provided |
5 | .\" that: (1) source distributions retain this entire copyright notice and | |
6 | .\" comment, and (2) distributions including binaries display the following | |
7 | .\" acknowledgement: ``This product includes software developed by the | |
8 | .\" University of California, Berkeley and its contributors'' in the | |
9 | .\" documentation or other materials provided with the distribution and in | |
10 | .\" all advertising materials mentioning features or use of this software. | |
11 | .\" Neither the name of the University nor the names of its contributors may | |
12 | .\" be used to endorse or promote products derived from this software without | |
13 | .\" specific prior written permission. | |
14 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | |
15 | .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | |
16 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
1fa17096 | 17 | .\" |
1c15e888 | 18 | .\" @(#)rsh.1 6.8.1.1 (Berkeley) 10/21/90 |
a9c6ea3c | 19 | .\" |
1c15e888 | 20 | .Dd October 21, 1990 |
5325ced3 CL |
21 | .Dt RSH 1 |
22 | .Os BSD 4.2 | |
23 | .Sh NAME | |
24 | .Nm rsh | |
25 | .Nd remote shell | |
26 | .Sh SYNOPSIS | |
27 | .Ar rsh | |
b29344f1 | 28 | .Op Fl Kdn |
5325ced3 CL |
29 | .Op Fl k Ar realm |
30 | .Op Fl l Ar username | |
31 | .Ar host | |
32 | .Op command | |
33 | .Sh DESCRIPTION | |
34 | .Nm Rsh | |
3a442ca8 | 35 | executes |
5325ced3 | 36 | .Ar command |
3a442ca8 | 37 | on |
5325ced3 CL |
38 | .Ar host . |
39 | .Pp | |
40 | .Nm Rsh | |
1fa17096 KM |
41 | copies its standard input to the remote command, the standard |
42 | output of the remote command to its standard output, and the | |
43 | standard error of the remote command to its standard error. | |
44 | Interrupt, quit and terminate signals are propagated to the remote | |
3a442ca8 | 45 | command; |
5325ced3 | 46 | .Nm rsh |
3a442ca8 KB |
47 | normally terminates when the remote command does. |
48 | The options are as follows: | |
5325ced3 CL |
49 | .Tp Fl K |
50 | The | |
51 | .Fl K | |
52 | option turns off all Kerberos authentication. | |
53 | .Tp Fl d | |
54 | The | |
55 | .Fl d | |
56 | option turns on socket debugging (using | |
57 | .Xr setsockopt 2 ) | |
3a442ca8 | 58 | on the TCP sockets used for communication with the remote host. |
5325ced3 CL |
59 | .Tp Fl k |
60 | The | |
61 | .Fl k | |
62 | option causes | |
63 | .Nm rsh | |
33fe1ab4 | 64 | to obtain tickets for the remote host in |
5325ced3 | 65 | .Ar realm |
33fe1ab4 | 66 | instead of the remote host's realm as determined by |
5325ced3 CL |
67 | .Xr krb_realmofhost 3 . |
68 | .Tp Fl l | |
3a442ca8 | 69 | By default, the remote username is the same as the local username. |
5325ced3 CL |
70 | The |
71 | .Fl l | |
72 | option allows the remote name to be specified. | |
3a442ca8 KB |
73 | Kerberos authentication is used, and authorization is determined |
74 | as in | |
5325ced3 CL |
75 | .Xr rlogin 1 . |
76 | .Tp Fl n | |
77 | The | |
78 | .Fl n | |
79 | option redirects input from the special device | |
80 | .Pa /dev/null | |
3a442ca8 | 81 | (see the BUGS section of this manual page). |
5325ced3 CL |
82 | .Tp |
83 | .Pp | |
3a442ca8 | 84 | If no |
5325ced3 | 85 | .Ar command |
3a442ca8 | 86 | is specified, you will be logged in on the remote host using |
5325ced3 CL |
87 | .Xr rlogin 1 . |
88 | .Pp | |
3a442ca8 KB |
89 | Shell metacharacters which are not quoted are interpreted on local machine, |
90 | while quoted metacharacters are interpreted on the remote machine. | |
91 | For example, the command | |
5325ced3 CL |
92 | .Pp |
93 | .Dl rsh otherhost cat remotefile >> localfile | |
94 | .Pp | |
1fa17096 | 95 | appends the remote file |
5325ced3 | 96 | .Ar remotefile |
33fe1ab4 | 97 | to the local file |
5325ced3 | 98 | .Ar localfile , |
1fa17096 | 99 | while |
5325ced3 CL |
100 | .Pp |
101 | .Dl rsh otherhost cat remotefile \&">>\&" other_remotefile | |
102 | .Pp | |
1fa17096 | 103 | appends |
5325ced3 | 104 | .Ar remotefile |
1fa17096 | 105 | to |
5325ced3 CL |
106 | .Ar other_remotefile . |
107 | .\" .Pp | |
108 | .\" Many sites specify a large number of host names as commands in the | |
109 | .\" directory /usr/hosts. | |
110 | .\" If this directory is included in your search path, you can use the | |
111 | .\" shorthand ``host command'' for the longer form ``rsh host command''. | |
112 | .Sh FILES | |
113 | .Dw /etc/hosts | |
114 | .Di L | |
115 | .Dp Pa /etc/hosts | |
116 | .Dp | |
117 | .Sh SEE ALSO | |
118 | .Xr rlogin 1 , | |
119 | .Xr kerberos 3 , | |
120 | .Xr krb_sendauth 3 , | |
121 | .Xr krb_realmofhost 3 | |
122 | .Sh HISTORY | |
123 | .Nm Rsh | |
124 | appeared in 4.2 BSD | |
125 | .Sh BUGS | |
1fa17096 | 126 | If you are using |
5325ced3 | 127 | .Xr csh 1 |
1fa17096 | 128 | and put a |
5325ced3 | 129 | .Nm rsh |
3a442ca8 KB |
130 | in the background without redirecting its input away from the terminal, |
131 | it will block even if no reads are posted by the remote command. | |
132 | If no input is desired you should redirect the input of | |
5325ced3 CL |
133 | .Nm rsh |
134 | to | |
135 | .Pa /dev/null | |
136 | using the | |
137 | .Fl n | |
138 | option. | |
139 | .Pp | |
1fa17096 KM |
140 | You cannot run an interactive command |
141 | (like | |
5325ced3 | 142 | .Xr rogue 6 |
1fa17096 | 143 | or |
5325ced3 | 144 | .Xr vi 1 ) |
3a442ca8 | 145 | using |
5325ced3 | 146 | .Nm rsh ; |
1fa17096 | 147 | use |
5325ced3 | 148 | .Xr rlogin 1 |
3a442ca8 | 149 | instead. |
5325ced3 | 150 | .Pp |
3a442ca8 | 151 | Stop signals stop the local |
5325ced3 | 152 | .Nm rsh |
3a442ca8 KB |
153 | process only; this is arguably wrong, but currently hard to fix for reasons |
154 | too complicated to explain here. |