]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/cpu
paint(1): english
[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 -R
34 |
35 .B -O
36 ] [
37 .B -A
38 .I address
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 .PD
131 .PP
132 The
133 .B -e
134 option specifies an encryption and/or hash algorithm to
135 use for the connection.  If both are specified, they must
136 be space separated and comprise a single argument, so they
137 must be quoted if in a shell command.  The default is
138 .L rc4_256
139 encryption and
140 .L sha1
141 hashing.  See
142 .IR ssl (3)
143 for details on possible algorithms.  The argument
144 .L clear
145 specifies no encryption algorithm and can be used to talk
146 to older versions of the
147 .I cpu
148 service.
149 .PP
150 The
151 .B -k
152 flag specifies a key pattern to use to restrict the keys
153 selected by the
154 .I auth_proxy
155 call used for authentication.
156 .PP
157 The name space is built by running
158 .B /usr/$user/lib/profile
159 with the root of the invoking name space bound to
160 .BR /mnt/term .
161 The
162 .B service
163 environment variable is set to
164 .BR cpu ;
165 the
166 .B cputype
167 and
168 .B objtype
169 environment variables reflect the server's architecture.
170 .PP
171 The
172 .B -R
173 flag causes
174 .I cpu
175 to run the server (remote) side of the protocol.
176 It is run from service files such as
177 .BR /bin/service/tcp17010 .
178 The
179 .B -O
180 flag is similar but simulates the pre-9P2000 version
181 of the 
182 .I cpu
183 protocol.
184 .PP
185 The
186 .B -p
187 flag pushes the
188 .IR aan (8)
189 filter onto the connection to protect against temporary
190 network outages.
191 .PP
192 The
193 .B -A
194 flag sets the announce-string
195 .I address
196 to use for
197 .IR aan (8)
198 connections, if requested by the initial protocol.
199 .SH FILES
200 The name space of the terminal side of the
201 .I cpu
202 command is mounted, via
203 .IR exportfs (4),
204 on the CPU side on directory
205 .BR /mnt/term .
206 The files such as
207 .B /dev/cons
208 are bound to their standard locations from there.
209 .SH SOURCE
210 .B /sys/src/cmd/cpu.c
211 .SH SEE ALSO
212 .IR rc (1) ,
213 .IR rio (1) ,
214 .IR exportfs (4) ,
215 .IR aan (8)
216 .SH BUGS
217 Binds and mounts done after the terminal
218 .B lib/profile
219 is run are not reflected in the new name space.
220 .PP
221 By default, the entire namespace of the local system is
222 exported to the remote system. Use of the
223 .B -P
224 option in conjunction with a customized patternfile can
225 limit this exposure, but also limits the usefulness of
226 .B /mnt/term.