home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / OS9_Unix.lzh / RSHSRC / rsh.1 < prev    next >
Text File  |  1992-09-09  |  5KB  |  182 lines

  1. .\" Copyright (c) 1983, 1990 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)rsh.1    6.10 (Berkeley) 7/24/91
  33. .\"
  34. .Dd July 24, 1991
  35. .Dt RSH 1
  36. .Os BSD 4.2
  37. .Sh NAME
  38. .Nm rsh
  39. .Nd remote shell
  40. .Sh SYNOPSIS
  41. .Nm rsh
  42. .Op Fl Kdnx
  43. .Op Fl k Ar realm
  44. .Op Fl l Ar username
  45. .Ar host
  46. .Op command
  47. .Sh DESCRIPTION
  48. .Nm Rsh
  49. executes
  50. .Ar command
  51. on
  52. .Ar host  .
  53. .Pp
  54. .Nm Rsh
  55. copies its standard input to the remote command, the standard
  56. output of the remote command to its standard output, and the
  57. standard error of the remote command to its standard error.
  58. Interrupt, quit and terminate signals are propagated to the remote
  59. command;
  60. .Nm rsh
  61. normally terminates when the remote command does.
  62. The options are as follows:
  63. .Bl -tag -width flag
  64. .It Fl K
  65. The
  66. .Fl K
  67. option turns off all Kerberos authentication.
  68. .It Fl d
  69. The
  70. .Fl d
  71. option turns on socket debugging (using
  72. .Xr setsockopt  2  )
  73. on the
  74. .Tn TCP
  75. sockets used for communication with the remote host.
  76. .It Fl k
  77. The
  78. .Fl k
  79. option causes
  80. .Nm rsh
  81. to obtain tickets for the remote host in
  82. .Ar realm
  83. instead of the remote host's realm as determined by
  84. .Xr krb_realmofhost  3  .
  85. .It Fl l
  86. By default, the remote username is the same as the local username.
  87. The
  88. .Fl l
  89. option allows the remote name to be specified.
  90. Kerberos authentication is used, and authorization is determined
  91. as in
  92. .Xr rlogin  1  .
  93. .It Fl n
  94. The
  95. .Fl n
  96. option redirects input from the special device
  97. .Pa /dev/null
  98. (see the
  99. .Sx BUGS
  100. section of this manual page).
  101. .It Fl x
  102. The
  103. .Fl x
  104. option turns on
  105. .Tn DES
  106. encryption for all data exchange.
  107. This may introduce a significant delay in response time.
  108. .El
  109. .Pp
  110. If no
  111. .Ar command
  112. is specified, you will be logged in on the remote host using
  113. .Xr rlogin  1  .
  114. .Pp
  115. Shell metacharacters which are not quoted are interpreted on local machine,
  116. while quoted metacharacters are interpreted on the remote machine.
  117. For example, the command
  118. .Pp
  119. .Dl rsh otherhost cat remotefile >> localfile
  120. .Pp
  121. appends the remote file
  122. .Ar remotefile
  123. to the local file
  124. .Ar localfile ,
  125. while
  126. .Pp
  127. .Dl rsh otherhost cat remotefile \&">>\&" other_remotefile
  128. .Pp
  129. appends
  130. .Ar remotefile
  131. to
  132. .Ar other_remotefile .
  133. .\" .Pp
  134. .\" Many sites specify a large number of host names as commands in the
  135. .\" directory /usr/hosts.
  136. .\" If this directory is included in your search path, you can use the
  137. .\" shorthand ``host command'' for the longer form ``rsh host command''.
  138. .Sh FILES
  139. .Bl -tag -width /etc/hosts -compact
  140. .It Pa /etc/hosts
  141. .El
  142. .Sh SEE ALSO
  143. .Xr rlogin 1 ,
  144. .Xr kerberos 3 ,
  145. .Xr krb_sendauth 3 ,
  146. .Xr krb_realmofhost 3
  147. .Sh HISTORY
  148. The
  149. .Nm rsh
  150. command appeared in
  151. .Bx 4.2 .
  152. .Sh BUGS
  153. If you are using
  154. .Xr csh  1
  155. and put a
  156. .Nm rsh
  157. in the background without redirecting its input away from the terminal,
  158. it will block even if no reads are posted by the remote command.
  159. If no input is desired you should redirect the input of
  160. .Nm rsh
  161. to
  162. .Pa /dev/null
  163. using the
  164. .Fl n
  165. option.
  166. .Pp
  167. You cannot run an interactive command
  168. (like
  169. .Xr rogue  6
  170. or
  171. .Xr vi  1  )
  172. using
  173. .Nm rsh  ;
  174. use
  175. .Xr rlogin  1
  176. instead.
  177. .Pp
  178. Stop signals stop the local
  179. .Nm rsh
  180. process only; this is arguably wrong, but currently hard to fix for reasons
  181. too complicated to explain here.
  182.