summaryrefslogtreecommitdiff
path: root/sys/man/1/rcpu
blob: 7b4868236c32fdffcb181f3ade801defaeb1a5c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.TH RCPU 1
.SH NAME
rcpu, rimport, rexport, rconnect \- connection to CPU server
.SH SYNOPSIS
.B rcpu
[
.B -u
.I user
] [
.B -k
.I keypattern
] [
.B -P
.I patternfile
] [
.B -p
] [
.B -h
.I host
] [
.B -c
.I cmd arg ...
]
.PP
.B rimport
[
.B -abcCnq
] [
.B -s
.I name
] [
.B -u
.I user
] [
.B -k
.I keypattern
] [
.B -p
]
.I host
.I tree
[
.I mountpoint
]
.PP
.B rexport
[
.B -abcCnq
] [
.B -s
.I remotename
] [
.B -m
.I remotemtpt
] [
.B -u
.I user
] [
.B -k
.I keypattern
] [
.B -P
.I patternfile
] [
.B -p
]
.I tree
.I host
[
.I remotecmd arg ...
]
.PP
.B rconnect
[
.B -u
.I user
] [
.B -k
.I keypattern
] [
.B -p
]
.I host
.I remotescript
.I localcommand arg ...
.SH DESCRIPTION
.I Rcpu
runs commands from
.IR rc (1)
on a cpu server with the local namespace exported to
the remote side under
.BR /mnt/term .
The current directory, interrupt notes, standard file descriptors 0,1,2
and
.B /dev/cons
are passed to the remote side. The command to run can be passed
with
.B -c
.IR "cmd arg ..." ,
otherwise an interactive shell is started. The user's profile
is run before the command with
.B $service
set to
.B cpu
to allow further customization of the environment (see
.IR rc (1)
for more information).
The cpu server can be specified with
.B -h
.IR host ,
otherwise it defaults to the environment variable
.B $cpu
or is looked up from
.IR ndb (6).
.PP
.I Rimport
mounts a remote directory
.I tree
from a cpu server
.I host
into the local namespace at
.IR mountpoint .
When
.I mountpoint
is omitted, it is set the same as
.IR tree .
When the
.B -s
.I name
option is present, the service is also posted to
.BI /srv/ name
allowing it to be mounted in other namespaces.
.PP
.I Rexport
is the reverse of
.IR rimport ,
exporting a local directory
.I tree
to the server
.I host
and optionally executing
.I remotecmd arg
on the server side after posting the service to
.BI /srv/ remotename
or mounting it at
.IR remotemtpt .
.PP
.I Rconnect
is a helper program handling client side connection setup for
the commands listed above. The rcpu protocol starts by setting up a mutual
authenticated and encrypted TLS connection using
.IR tlssrv (8)
followed by the client sending an 
.IR rc (1)
.I remotescript
file to the server which gets executed under the authenticated user
with file descriptors 0,1,2 cross connected to file descriptors 0,1
of the client side running
.I localcommand
over the encrypted connection.
.PP
The common options are:
.PD
.TP
.B -a -b -c -C -n -q
Specifies the
.I mount
options (see
.IR bind (1))
for
.I rimport
and
.IR rexport .
.TP
.B -P \fIpatternfile
Restricts the set of exported files (see
.IR exportfs (4))
for
.I rcpu
and
.IR rexport .
.TP
.B -u \fIuser
Remote user id to authenticate as.
.TP
.B -k \fIkeypattern
Use
.I keypattern
to select a key to authenticate to the remote side (see
.IR auth (2)).
.TP
.B -p
Protect the connection against connection resets by establishing
.IR aan (8)
tunnel.
.SH FILES
.B /rc/bin/service/tcp17019
.SH SOURCE
.B /rc/bin/rcpu
.br
.B /rc/bin/rimport
.br
.B /rc/bin/rexport
.br
.B /rc/bin/rconnect
.SH "SEE ALSO"
.IR rc (1) ,
.IR con (1) ,
.IR exportfs (4) ,
.IR tlssrv (8) ,
.IR aan (8)