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