cpu 3.5 KB

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