cpu 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. .TH CPU 1
  2. .SH NAME
  3. cpu \- connection to CPU server
  4. .SH SYNOPSIS
  5. .B cpu
  6. [
  7. .B -h
  8. .I server
  9. ] [
  10. .B -u
  11. .I user
  12. ] [
  13. .B -a
  14. .I auth-method
  15. ] [
  16. .B -P
  17. .I patternfile
  18. ] [
  19. .B -e
  20. .I encryption-hash-algs
  21. ] [
  22. .B -k
  23. .I keypattern
  24. ] [
  25. .B -c
  26. .I cmd args ...
  27. ]
  28. .PP
  29. .B cpu
  30. [
  31. .B -R
  32. ]
  33. .SH DESCRIPTION
  34. .I Cpu
  35. starts an
  36. .IR rc (1)
  37. running on the
  38. .I server
  39. machine, or the machine named in the
  40. .B $cpu
  41. environment variable if there is no
  42. .B -h
  43. option.
  44. .IR Rc 's
  45. standard input, output, and error files will be
  46. .B /dev/cons
  47. in the name space where the
  48. .I cpu
  49. command was invoked.
  50. Normally,
  51. .I cpu
  52. is run in an
  53. .IR rio (1)
  54. window on a terminal, so
  55. .IR rc
  56. output goes to that window, and input comes from the keyboard
  57. when that window is current.
  58. .IR Rc 's
  59. current directory is
  60. the working directory of the
  61. .I cpu
  62. command itself.
  63. .PP
  64. The name space for the new
  65. .I rc
  66. is an analogue of the name space where the
  67. .I cpu
  68. command was invoked:
  69. it is the same except for architecture-dependent bindings such as
  70. .B /bin
  71. and the use of fast paths to file servers, if available.
  72. .PP
  73. If a
  74. .B -u
  75. argument is present,
  76. .I cpu
  77. uses the argument as the remote user id.
  78. .PP
  79. If a
  80. .B -c
  81. argument is present, the remainder of the command line is executed by
  82. .I rc
  83. on the server, and then
  84. .I cpu
  85. exits.
  86. .PP
  87. If a
  88. .B -P
  89. argument is present, the
  90. .I patternfile
  91. is passed to
  92. .IR exportfs (4)
  93. to control how much of the local name space will be exported to
  94. the remote system.
  95. .PP
  96. The
  97. .B -a
  98. command allows the user to specify the authentication mechanism used
  99. when connecting to the remote system. The two possibilities for
  100. .I auth-method
  101. are:
  102. .TF netkey
  103. .TP
  104. .B p9
  105. This is the default. Authentication is done using the standard Plan 9
  106. mechanisms, (see
  107. .IR authsrv (6)).
  108. No user interaction is required.
  109. .TP
  110. .B netkey
  111. Authentication is done using challenge/response and a hand held
  112. authenticator or the
  113. .I netkey
  114. program
  115. (see
  116. .IR passwd (1)).
  117. The user must encrypt the challenge and type the encryption
  118. back to
  119. .IR cpu .
  120. This is used if the local host is in a different protection domain than
  121. the server or if the user wants to log into the server as a different
  122. user.
  123. .PD
  124. .PP
  125. The
  126. .B -e
  127. option specifies an encryption and/or hash algorithm to
  128. use for the connection. If both are specified, they must
  129. be space separated and comprise a single argument, so they
  130. must be quoted if in a shell command. The default is
  131. .L rc4_256
  132. encryption and
  133. .L sha1
  134. hashing. See
  135. .IR ssl (3)
  136. for details on possible algorithms. The argument
  137. .L clear
  138. specifies no encryption algorithm and can be used to talk
  139. to older versions of the
  140. .I cpu
  141. service.
  142. .PP
  143. The
  144. .B -k
  145. flag specifies a key pattern to use to restrict the keys
  146. selected by the
  147. .I auth_proxy
  148. call used for authentication.
  149. .PP
  150. The name space is built by running
  151. .B /usr/$user/lib/profile
  152. with the root of the invoking name space bound to
  153. .BR /mnt/term .
  154. The
  155. .B service
  156. environment variable is set to
  157. .BR cpu ;
  158. the
  159. .B cputype
  160. and
  161. .B objtype
  162. environment variables reflect the server's architecture.
  163. .PP
  164. The
  165. .B -R
  166. flag causes
  167. .I cpu
  168. to run the server (remote) side of the protocol.
  169. It is run from service files such as
  170. .BR /bin/service/tcp17010 .
  171. .SH FILES
  172. The name space of the terminal side of the
  173. .I cpu
  174. command is mounted, via
  175. .IR exportfs (4),
  176. on the CPU side on directory
  177. .BR /mnt/term .
  178. The files such as
  179. .B /dev/cons
  180. are bound to their standard locations from there.
  181. .SH SOURCE
  182. .B /sys/src/cmd/cpu.c
  183. .SH SEE ALSO
  184. .IR rc (1) ,
  185. .IR rio (1) ,
  186. .IR exportfs (4)
  187. .SH BUGS
  188. Binds and mounts done after the terminal
  189. .B lib/profile
  190. is run are not reflected in the new name space.
  191. .PP
  192. When using the
  193. .B -a
  194. option to `log in' as another user, be aware that
  195. resources in the local name space will be made
  196. available to that user.