Imported Upstream version 3.1.0
[debian/amanda] / man / amanda-auth.7
1 '\" t
2 .\"     Title: amanda-auth
3 .\"    Author: Jean-Louis Martineau <martineau@zmanda.com>
4 .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
5 .\"      Date: 06/01/2010
6 .\"    Manual: Miscellanea
7 .\"    Source: Amanda 3.1.0
8 .\"  Language: English
9 .\"
10 .TH "AMANDA\-AUTH" "7" "06/01/2010" "Amanda 3\&.1\&.0" "Miscellanea"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "NAME"
22 amanda-auth \- Communication/Authentication methods between Amanda server and client
23 .SH "DESCRIPTION"
24 .PP
25 Amanda offers 7 methods of communication between Amanda server (sometimes also called the tape server) and clients, each with its own authentication method\&. The desired communication method is specified by the
26 \fIauth\fR
27 parameter in the amanda\&.conf file (\fBamanda.conf\fR(5)) commonly as a dumptype\&. Valid values to the
28 \fIauth\fR
29 parameter are
30 \fBbsd\fR,
31 \fBbsdudp\fR,
32 \fBbsdtcp\fR,
33 \fBkrb4\fR,
34 \fBkrb5\fR,
35 \fBlocal\fR,
36 \fBrsh\fR, and
37 \fBssh\fR\&. Please note that
38 \fBkrb4\fR
39 will be removed in the next release\&. The authentication and communication method is used during the backup process
40 \fBamdump\fR
41 (amdump(8)) as well as the recovery process
42 \fBamrecover\fR
43 (amrecover(8))\&.
44 .SH "COMPILATION AND GENERAL INFORMATION"
45 .PP
46 The communication method and thus type of authentication that will be used by the Amanda server is specified by the
47 \fIauth\fR
48 parameter in the dumptype for each disklist entry (DLE)\&. The
49 \fIauth\fR
50 parameter thus may be easily and globally specified in the "global" dumptype\&. If
51 \fIauth\fR
52 is not specified, the
53 \fBbsd\fR
54 communication method is used\&. See
55 \fBamanda.conf\fR(5)
56 for more information on Amanda configuration and dumptypes, and
57 \fBdisklist\fR(5)
58 for more information on disklists\&.
59 .PP
60 On the client side, the Amanda daemon
61 \fBamandad\fR
62 validates the connection depending on the value of the
63 \fBauth\fR
64 argument passed to it (see Amanda(8))\&. Also, when it comes to recovery, the
65 \fBauth\fR
66 parameter can be specified in the
67 \fBamanda-client.conf\fR(5)
68 file to specify the communication method to be used by the client to the server\&.
69 .PP
70 When Amanda is being built from source code, desired communication and thus authentication methods (shown as "Authentication") must be specified as configure options at compilation time\&.
71 .sp
72 .nf
73 Authentication    Configure option(s)
74  bsd                    \-\-with\-bsd\-security      \-\-with\-amandahosts (pre\-2\&.6)
75  bsdtcp         \-\-with\-bsdtcp\-security   \-\-with\-amandahosts (pre\-2\&.6)
76  bsdudp         \-\-with\-bsdudp\-security   \-\-with\-amandahosts (pre\-2\&.6)
77  krb5           \-\-with\-krb5\-security
78  local           (always included)
79  rsh                    \-\-with\-rsh\-security
80  ssh                    \-\-with\-ssh\-security
81 .fi
82 .PP
83 There are additional configure options for
84 \fBbsd\fR,
85 \fBbsdudp\fR, and
86 \fBbsdtcp\fR
87 to allow for specifying explicit UDP and TCP port ranges\&.
88 .sp
89 .nf
90    \-\-with\-udpportrange
91    \-\-with\-tcpportrange
92    \-\-with\-low\-tcpportrange
93 .fi
94 .PP
95 See
96 \fBPORT USAGE\fR
97 below for more information\&.
98 .PP
99 There are additional configure options for Kerberos if you so desire\&. All but the last option are for Kerberos 4\&. Defaults shown in square brackets\&.
100 .sp
101 .nf
102    \-\-with\-server\-principal=ARG    server host principal  [amanda]
103    \-\-with\-server\-instance=ARG     server host instance   []
104    \-\-with\-server\-keyfile=ARG      server host key file   [/\&.amanda]
105    \-\-with\-client\-principal=ARG    client host principal  [rcmd]
106    \-\-with\-client\-instance=ARG     client host instance   [HOSTNAME_INSTANCE]
107    \-\-with\-client\-keyfile=ARG      client host key file   [KEYFILE]
108    \-\-with\-ticket\-lifetime=ARG     ticket lifetime        [128]
109    \-\-with\-krb4\-security=DIR       where libkrb\&.a lives   [see below]
110    \-\-with\-krb5\-security=DIR       where libkrb\&.a lives   [see below]
111 .fi
112 .PP
113 If configuring with \-\-with\-krb4\-security and/or \-\-with\-krb5\-security, the configure script will search under /usr/kerberos/lib, /usr/cygnus/lib, /usr/lib, and /opt/kerberos/lib for the kerberos bits, libkrb\&.a, in this order\&. Kerberos support will not be added if it does not find them\&. If the kerberos bits are found under some other hierarchy, you can specify this via \-\-with\-krb5\-security=DIR and/or \-\-with\-krb4\-security=DIR, where DIR is where the kerberos bits live\&. The configure script will then look in the \'lib\' directory under this hierarchy for libkrb\&.a\&.
114 .PP
115 The
116 \fBauth\fR
117 parameter selects a communication/authentication method to use between the client and the backup server\&. These methods are described each in their own section below\&.
118 .SH "BSD, BSDUDP, AND BSDTCP COMMUNICATION AND AUTHENTICATION"
119 .PP
120 For additional information including example configurations, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_bsd/bsdudp/bsdtcp_authentication\&.
121 .PP
122 The
123 \fBbsd\fR,
124 \fBbsdudp\fR, and
125 \fBbsdtcp\fR
126 communication methods use either UDP, TCP, or both protocols operating as a network service to authenticate and exchange data between server and clients\&.
127 .PP
128 In addition to compilation and general configuration (see
129 \fBCOMPILATION AND GENERAL INFORMATION\fR
130 above), the authentication method that the client is configured to receive is specified by the
131 \fBauth\fR
132 parameter in the network service configuration for Amanda\&. The authentication method used by an Amanda client to reach the server during recovery is the authentication method specified by the
133 \fIauth\fR
134 parameter in the client\'s Amanda network service configuration or in its amanda\-client\&.conf file (see amanda\-client\&.conf(5))\&.
135 .PP
136 By default, Amanda use the "amanda" service name and associated port set in /etc/services\&. It can be changed by setting the dumptype
137 \fIclient_port\fR
138 option to a different port number or a different service name\&. All examples are for the service name "amanda" that uses the default port 10080\&.
139 .SS "\&.amandahosts file"
140 .PP
141 Servers and clients using the bsd, bsdudp, and bsdtcp authentication methods refer to the \&.amandahosts file to control access\&. Amanda should be compiled for this access control if one of these methods will be used and is the default compilation option for Amanda 2\&.6 (use \-\-with\-amandahosts when compiling pre\-2\&.6 versions of Amanda)\&.
142 .PP
143 Amanda looks for the \&.amandahosts file in the Amanda user\'s home directory, commonly /var/lib/amanda\&.
144 .PP
145 Each authorization is on its own line in the following format
146 .PP
147 \fIhostname\fR
148 [
149 \fIusername\fR
150 [
151 \fIservice\&.\&.\&.\fR
152 ] ]
153 .PP
154 If
155 \fIusername\fR
156 is ommitted, it defaults to the user running
157 \fBamandad\fR, i\&.e\&. the user listed in the
158 \fBinetd\fR
159 or
160 \fBxinetd\fR
161 configuration file\&.
162 .PP
163 \fIservice\&.\&.\&.\fR
164 is a space\-delimited list of services the client is authorized to execute:
165 \fBnoop\fR,
166 \fBselfcheck\fR,
167 \fBsendsize\fR,
168 \fBsendbackup\fR,
169 \fBamdump\fR
170 (a shortcut for the previous four services which are required on clients),
171 \fBamindexd\fR, and
172 \fBamidxtaped\fR\&. The last two services are required on a server for clients to connect to it using
173 \fBamrecover\fR\&.
174 .PP
175 If service is omitted, it defaults to
176 \fBnoop selfcheck sendsize sendbackup\fR
177 (which is equivalent to
178 \fBamdump\fR)\&.
179 .PP
180 Example of the \&.amandahosts file on an Amanda client
181 .sp
182 .nf
183     \fBamandaserver\&.example\&.com   amandabackup   amdump\fR
184 .fi
185 .PP
186 Example of the \&.amandahosts file on an Amanda server
187 .sp
188 .nf
189     \fBamandaclient1\&.example\&.com   root   amindexd amidxtaped\fR
190 .fi
191 .SS "bsd communication and authentication"
192 .PP
193 The authentication is done using \&.amandahosts file in the Amanda user\'s home directory\&. The protocol between Amanda server and client is UDP\&. The number of disk list entries (DLEs)\-\-number of Amanda clients\-\-is limited by the UDP packet size\&. This authentication protocol will use a different port for each data stream (see PORT USAGE below)
194 .SS "bsdudp communication and authentication"
195 .PP
196 The authentication is done using \&.amandahosts files in the Amanda user\'s home directory\&. It uses UDP protocol between Amanda server and client for data and hence the number of DLEs is limited by the UDP packet size\&. It uses one TCP port to establish the connection and multiplexes all data streams using one port on the server (see PORT USAGE below)\&.
197 .SS "bsdtcp communication and authentication"
198 .PP
199 The authentication is done using \&.amandahosts files in the backup user\'s (for example: amandabackup) home directory\&. It uses TCP protocol between Amanda server and client\&. On the client, two reserved ports are used\&. On the server, all data streams are multiplexed to one port (see PORT USAGE below)\&.
200 .SS "USING INETD SERVER"
201 .PP
202 Template for Amanda client inetd service entry
203 .sp
204 .nf
205 \fI   service_name\fR \fIsocket_type\fR \fIprotocol\fR \fIwait/nowait\fR \fIamanda_backup_user\fR \fIabsolute_path_to_amandad\fR amandad \fIserver_args\fR
206 .fi
207 .PP
208 Client example of using
209 \fBbsd\fR
210 authorization for inetd server given Amanda user is "amandabackup":
211 .sp
212 .nf
213 \fB   amanda dgram udp wait amandabackup /path/to/amandad amandad \-auth=bsd amdump\fR
214 .fi
215 .PP
216 The same could be used for
217 \fBbsdudp\fR
218 if specifying \-auth=bsdudp instead of \-auth=bsd\&.
219 .PP
220 Client example of using
221 \fBbsdtcp\fR
222 authorization for inetd server given Amanda user is "amandabackup":
223 .sp
224 .nf
225 \fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump\fR
226 .fi
227 .PP
228 \fBamindexd\fR
229 and
230 \fBamidxtaped\fR
231 would typically be added at the end of the line as
232 \fBamandad\fR
233 server arguments for an Amanda server\&.
234 .PP
235 Server example of using
236 \fBbsdtcp\fR
237 authorization for inetd server given Amanda user is "amandabackup":
238 .sp
239 .nf
240 \fB   amanda stream tcp nowait amanda /path/to/amandad amandad \-auth=bsdtcp amdump amindexd amidxtaped\fR
241 .fi
242 .PP
243 For Amanda version 2\&.5\&.0 and earlier, remember that neither
244 \fBbsdudp\fR
245 nor
246 \fBbsdtcp\fR
247 are supported and the Amanda daemon
248 \fBamandad\fR
249 accepts no arguments\&. Because of the latter,
250 \fBamrecover\fR
251 as of Amanda version 2\&.5\&.1 is not compatible with 2\&.5\&.0 and earlier servers\&. Thus, servers that are 2\&.5\&.0 or earlier must, in addition to the
252 \fIamanda\fR
253 service, run
254 \fIamindexd\fR
255 and
256 \fIamidxtaped\fR
257 Amanda services as their own network services, amandaidx and amidxtape, respectively (see below)\&.
258 .PP
259 There are no compatibility issues if server and clients are all 2\&.5\&.0 or earlier\&. If your server is 2\&.5\&.1 or later, you can still have clients that are 2\&.5\&.0 and earlier although you must then use
260 \fBbsd\fR
261 communication/authentication with these clients and must also run
262 \fIamindexd\fR
263 and
264 \fIamidxtaped\fR
265 Amanda services on the server as their own network services, amandaidx and amidxtape, respectively (see below)\&. If you have a server that is 2\&.5\&.0 and earlier, clients of a later version on which you wish to run
266 \fBamrecover\fR
267 must use
268 \fBamoldrecover\fR
269 instead and, again, the server must be running the amandaidx and amidxtape network services\&.
270 .PP
271 Example of amindexd and amidxtaped Amanda daemon services configured as their own network services for a 2\&.5\&.0 or earlier server or a newer server having 2\&.5\&.0 or earlier clients
272 .sp
273 .nf
274 \fB   amandaidx stream tcp nowait amanda /usr/local/libexec/amanda/current/amindexd   amindexd\fR
275 \fB   amidxtape stream tcp nowait amanda /usr/local/libexec/amanda/current/amidxtaped amidxtaped\fR
276 .fi
277 .SS "USING XINETD SERVER"
278 .PP
279 Template for Amanda client xinetd service file
280 .sp
281 .nf
282 service amanda
283 {
284         only_from               = \fIAmanda server\fR
285         socket_type             = \fIsocket type\fR
286         protocol                = \fIprotocol\fR
287         wait                    = \fIyes/no\fR
288         user                    = \fIamanda backup user\fR
289         group                   = \fIamanda backup user group id\fR
290         groups                  = yes
291         server                  = \fIabsolute path to amandad\fR
292         server_args             = \fIamandad server arguments\fR
293         disable                 = no
294 }
295 .fi
296 .PP
297 The
298 \fIonly_from\fR
299 parameter can be used with xinetd but is usually in addition to the primary form of access control via the \&.amandahosts file\&.
300 .PP
301 Client example of using
302 \fBbsd\fR
303 authorization for xinetd server and for Amanda user "amandabackup":
304 .sp
305 .nf
306 service amanda
307 {
308         only_from       = amandaserver\&.example\&.com
309         socket_type     = dgram
310         protocol        = udp
311         wait            = yes
312         user            = amandabackup
313         group           = disk
314         groups          = yes
315         server          = /path/to/amandad
316         server_args     = \-auth=bsd amdump
317         disable         = no 
318 }
319 .fi
320 .PP
321 The same could be used for
322 \fBbsdudp\fR
323 if specifying \-auth=bsdudp instead of \-auth=bsd\&.
324 .PP
325 Client example of using
326 \fBbsdtcp\fR
327 authorization for xinetd server and for Amanda user "amandabackup":
328 .sp
329 .nf
330 service amanda
331 {
332         only_from       = amandaserver\&.example\&.com amandaclient\&.example\&.com
333         socket_type     = stream
334         protocol        = tcp
335         wait            = no
336         user            = amandabackup
337         group           = disk
338         groups          = yes
339         server          = /path/to/amandad
340         server_args     = \-auth=bsdtcp amdump
341         disable         = no 
342 }
343 .fi
344 .PP
345 \fBamindexd\fR
346 and
347 \fBamidxtaped\fR
348 would typically be added as additional
349 \fBamandad\fR
350 \fIserver_args\fR
351 for an Amanda server\&.
352 .PP
353 For Amanda version 2\&.5\&.0 and earlier, remember that neither
354 \fBbsdudp\fR
355 nor
356 \fBbsdtcp\fR
357 are supported and the Amanda daemon
358 \fBamandad\fR
359 accepts no arguments\&. Because of the latter,
360 \fBamrecover\fR
361 as of Amanda version 2\&.5\&.1 is not compatible with 2\&.5\&.0 and earlier servers\&. Thus, servers that are 2\&.5\&.0 or earlier must, in addition to the
362 \fIamanda\fR
363 service, run
364 \fIamindexd\fR
365 and
366 \fIamidxtaped\fR
367 Amanda services as their own network services, amandaidx and amidxtape, respectively (see below)\&.
368 .PP
369 There are no compatibility issues if server and clients are all 2\&.5\&.0 or earlier\&. If your server is 2\&.5\&.1 or later, you can still have clients that are 2\&.5\&.0 and earlier although you must then use
370 \fBbsd\fR
371 communication/authentication with these clients and must also run
372 \fIamindexd\fR
373 and
374 \fIamidxtaped\fR
375 Amanda services on the server as their own network services, amandaidx and amidxtape, respectively (see below)\&. If you have a server that is 2\&.5\&.0 and earlier, clients of a later version on which you wish to run
376 \fBamrecover\fR
377 must use
378 \fBamoldrecover\fR
379 instead and, again, the server must be running the amandaidx and amidxtape network services\&.
380 .PP
381 Example of amindexd and amidxtaped Amanda daemon services configured as their own network services for a 2\&.5\&.0 or earlier server or a newer server having 2\&.5\&.0 or earlier clients
382 .sp
383 .nf
384 service amandaidx
385 {
386         socket_type             = stream
387         protocol                = tcp
388         wait                    = no
389         user                    = amanda
390         group                   = disk
391         server                  = /usr/local/libexec/amanda/amindexd 
392         disable                 = no
393 }
394
395 service amidxtape
396 {
397         socket_type             = stream
398         protocol                = tcp
399         wait                    = no
400         user                    = amanda
401         group                   = disk
402         server                  = /usr/local/libexec/amanda/amidxtaped
403         disable                 = no
404 }
405 .fi
406 .SS "PORT USAGE"
407 .PP
408 List of TCP/UDP ports used by network service communication methods for Amanda server and client\&.
409 .sp
410 .nf
411    Key:
412        UP = Unreserved Port
413     RPpAP = Reserved Port per Amanda Process
414    UPpDLE = Unreserved Port per DLE
415      [\&.\&.] = Configure options that can be used at compile time to define port ranges
416
417 Authentication  Protocol        Amanda server                                   Amanda client
418 bsd                     udp             1 RPpAP [\-\-with\-udpportrange]                10080
419                         tcp             1 UP [\-\-with\-tcpportrange]           3 UPpDLE [\-\-with\-tcpportrange]
420 bsdudp          udp             1 RPpAP [\-\-with\-udpportrange]                10080
421                         tcp             1 UP [\-with\-tcpportrange]             1 UPpDLE [\-\-with\-tcpportrange]
422 bsdtcp          tcp             1 RPpAP [\-\-with\-low\-tcpportrange]   10080
423 .fi
424 .PP
425 Amanda server also uses two ports (dumper process) to communicate with the chunker/taper processes\&. These ports are in the range set by \-\-with\-tcpportrange\&.
426 .PP
427 You can override the default port ranges that Amanda was compiled with in each configuration using the
428 \fIreserved\-udp\-port\fR,
429 \fIreserved\-tcp\-port\fR, and
430 \fIunreserved\-tcp\-port\fR
431 parameters in amanda\&.conf and amanda\-client\&.conf configuration files (see
432 \fBamanda.conf\fR(5)
433 and
434 \fBamanda-client.conf\fR(5))\&.
435 .SH "KERBEROS COMMUNICATION AND AUTHENTICATION"
436
437 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Kerberos_authentication\&.
438 .PP
439 Amanda supports Kerberos 4 and 5 communication methods between Amanda server and client\&. Please note, however, that support for Kerberos 4 will be removed in the next release\&.
440 .PP
441 General information including compilation are given above (see
442 \fBCOMPILATION AND GENERAL INFORMATION\fR
443 above)\&. Below sections give specific Kerberos 4 and 5 information\&.
444 .SS "KERBEROS v4"
445
446 Please note that support for Kerberos 4 will be removed in the next release\&.
447
448 Kerberos 4 uses UDP protocol and the number of DLEs is limited by UDP packet size\&.
449
450 The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
451
452     kamanda      10081/udp
453 .PP
454 And the /etc/inetd\&.conf line is:
455 .sp
456 .nf
457     kamanda dgram udp wait root /usr/local/libexec/amanda/amandad amandad \-auth=krb4
458 .fi
459 .PP
460 Note that you\'re running this as root, rather than as your dump user\&. AMANDA will set its uid down to the dump user at times it doesn\'t need to read the srvtab file, and give up root permissions entirely before it goes off and runs dump\&. Alternately you can change your srvtab files to be readable by user amanda\&.
461 .PP
462 The following dumptype options apply to krb4:
463 .sp
464 .nf
465 auth "krb4"    # use krb4 auth for this host
466                # (you can mingle krb hosts and bsd \&.rhosts in one conf)
467 kencrypt       # encrypt this filesystem over the net using the krb4
468                # session key\&.  About 2x slower\&.  Good for those root
469                # partitions containing your keyfiles\&.  Don\'t want to
470                # give away the keys to an ethernet sniffer!
471                # This is currently always enabled\&.  There is no
472                # way to disable it\&.  This is a bug\&.
473 .fi
474 .SS "KERBEROS v5"
475 .PP
476 Kerberos 5 uses TCP and the server uses only one TCP port and data streams are multiplexed to this port\&.
477
478
479 The \fBkrb5\fR driver script defaults to:
480
481 /*
482  * The lifetime of our tickets in minutes\&.
483  */
484 #define AMANDA_TKT_LIFETIME     (12*60)
485
486 /*
487  * The name of the service in /etc/services\&.
488  */
489 #define AMANDA_KRB5_SERVICE_NAME        "k5amanda"
490
491 You can currently only override these by editing the source code\&.
492
493 The kerberized AMANDA service uses a different port on the client hosts\&. The /etc/services line is:
494
495    k5amanda      10082/tcp
496 .PP
497 And the /etc/inetd\&.conf line is:
498 .sp
499 .nf
500    k5amanda stream tcp nowait root /usr/local/libexec/amanda/amandad amandad \-auth=krb5
501 .fi
502 .PP
503 Note that you\'re running this as root, rather than as your dump user\&. AMANDA will set its UID down to the dump user at times it doesn\'t need to read the keytab file, and give up root permissions entirely before it goes off and runs dump\&. Alternately you can change your keytab files to be readable by user amanda\&. You should understand the security implications of this before changing the permissions on the keytab\&.
504 .PP
505 The following dumptype options apply to
506 \fBkrb5\fR:
507 .sp
508 .nf
509    auth "krb5"    # use krb5 auth for this host
510                   # (you can mingle krb hosts and bsd \&.rhosts in one conf)
511 .fi
512 .PP
513 The principal and keytab files that Amanda uses must be set in the amanda\&.conf file for kerberos 5 dumps to work\&. You can hardcode this in the source code if you really want to (common\-src/krb5\-security\&.c)
514 .sp
515 .nf
516    krb5keytab
517    krb5principal
518 .fi
519 .PP
520 For example:
521 .sp
522 .nf
523    krb5keytab     "/etc/krb5\&.keytab\-amanda"
524    krb5principal  "amanda/saidin\&.omniscient\&.com"
525 .fi
526 .PP
527 The principal in the second option must be contained in the first\&. The keytab should be readable by the amanda user (and definitely not world readable!) and is (obviously) on the server\&. In MIT\'s kadmin, the following:
528 .sp
529 .nf
530    addprinc \-randkey amanda/saidin\&.omniscient\&.com
531    ktadd \-k /etc/krb5\&.keytab\-amanda amanda/saidin\&.omniscient\&.com
532 .fi
533 .PP
534 will do the trick\&. You will obviously want to change the principal name to reflect something appropriate for the conventions at your site\&.
535 .PP
536 You must also configure each client to allow the amanda principal in for dumps\&.
537 .PP
538 There are several ways to go about authorizing a server to connect to a client\&.
539 .PP
540 The normal way is via a \&.k5amandausers file or a \&.k5login file in the client user\'s home directory\&. The determination of which file to use is based on the way you ran configure on AMANDA\&. By default, AMANDA will use \&.k5amandahosts, but if you configured with \-\-without\-amandahosts, AMANDA will use \&.k5login\&. (similar to the default for \&.rhosts/\&.amandahosts\-style security)\&. The \&.k5login file syntax is a superset of the default
541 \fBkrb5\fR
542 \&.k5login\&. The routines to check it are implemented in amanda rather than using krb5_kuserok because the connections are actually gssapi based\&.
543 .PP
544 This \&.k5amandahosts/\&.k5login is a hybrid of the \&.amandahosts and a \&.k5login file\&. You can just list principal names, as in a \&.k5login file and the principal will be permitted in from any host\&. If you do NOT specify a realm, then there is no attempt to validate the realm (this is only really a concern if you have cross\-realm authentication set up with another realm or something else that allows you multiple realms in your kdc\&. If you do specify a realm, only that principal@realm will be permitted to connect\&.
545 .PP
546 You may prepend this with a hostname and whitespace, and only that principal (with optional realm as above) will be permitted to access from that hostname\&.
547 .PP
548 Here are examples of valid entries in the \&.k5amandahosts:
549 .sp
550 .nf
551    service/amanda
552    service/amanda@TEST\&.COM
553    dumpmaster\&.test\&.com service/amanda
554    dumpmaster\&.test\&.com service/amanda@TEST\&.COM
555 .fi
556 .PP
557 Rather than using a \&.k5amandahosts or \&.k5login file, the easiest way is to use a principal named after the destination user, (such as amanda@TEST\&.COM in our example) and not have either a \&.k5amandahosts or \&.k5login file in the destination user\'s home directory\&.
558 .PP
559 There is no attempt to verify the realm in this case (only a concern if you have cross\-realm authentication setup)\&.
560 .SH "LOCAL COMMUNICATION"
561 .PP
562 The Amanda server communicates with the client internally versus over the network, ie\&. the client is also the server\&.
563 .PP
564 This is the only method that requires no authentication as it is clearly not needed\&.
565 .SH "RSH COMMUNICATION AND AUTHENTICATION"
566
567 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/Configuring_rsh_authentication\&.
568 .PP
569 The Amanda server communicates with its client as the Amanda user via the RSH protocol\&.
570 .PP
571 Please note that RSH protocol itself is insecure and should be used with caution especially on any servers and clients with public IPs\&.
572 .PP
573 Each Amanda client communicates with the server using one TCP port and all data streams from the client are multiplexed over one port\&. The number of Amanda clients is limited by the number of reserved ports available on the Amanda server\&. Some versions of RSH do not use reserved ports and, thus, this restriction is not valid\&.
574 .PP
575 General information including compilation is given above (see
576 \fBCOMPILATION AND GENERAL INFORMATION\fR
577 above)\&.
578 .PP
579 In addition to specifying the
580 \fIauth\fR
581 field in dumptype definition, it might be required to specify
582 \fIclient_username\fR
583 and
584 \fBamandad\fR
585 fields\&. If the backup user name is different on the Amanda client, the user name is specified as
586 \fBclient_username\fR\&. If the location of the Amanda daemon
587 \fBamandad\fR
588 is different on the Amanda client, the location is specified as
589 \fIamandad_path\fR
590 field value\&.
591 .sp
592 .nf
593 For example:
594 define dumptype rsh_example {
595          \&.\&.\&.
596          auth "rsh"
597          client_username "amandabackup"
598          amandad_path "/usr/lib/exec/amandad"
599          \&.\&.\&.
600 }
601 .fi
602 .SH "SSH COMMUNICATION AND AUTHENTICATION"
603
604 For more detail, see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_transport_encryption_with_SSH\&.
605
606 Amanda client sends data to the server using SSH\&. SSH keys have to be set up so that Amanda server can communicate with its clients using SSH\&.
607
608 General information including compilation is given above (see \fBCOMPILATION AND GENERAL INFORMATION\fR above)\&.
609
610 SSH provides transport encryption and authentication\&. To set up an SSH authentication session, Amanda will run the equivalent of the following to start the backup process\&.
611
612 \fB   /path/to/ssh \-l \fR\fB\fIuser_name\fR\fR\fB client\&.zmanda\&.com $libexecdir/amandad\fR
613
614 To use SSH, you need to set up SSH keys either by storing the passphrase in cleartext, using ssh\-agent, or using no passphrase at all\&.  All of these options have security implications which should be carefully considered before adoption\&.
615
616 When you use a public key on the client to do data encryption (see http://wiki\&.zmanda\&.com/index\&.php/How_To:Set_up_data_encryption), you can lock away the private key in a secure place\&. Both, transport and storage will be encrypted with such a setup\&. See http://wiki\&.zmanda\&.com/index\&.php/Encryption for an overview of encryption options\&.
617
618 Enable SSH authentication and set the ssh_keys option in all DLEs for that host by adding the following to the DLE itself or to the corresponding dumptype in amanda\&.conf:
619
620   auth "ssh"
621   ssh_keys "/home/amandabackup/\&.ssh/id_rsa_amdump"
622
623 \fIssh_keys\fR is the path to the private key on the client\&. If the username to which Amanda should connect is different from the default, then you should also add
624
625   client_username "otherusername"
626
627 If your server  \fBamandad\fR path and client  \fBamandad\fR path are different, you should also add
628
629   amandad_path "/client/amandad/path"
630 .PP
631 For a marginal increase in security, prepend the keys used for AMANDA in the clients\' authorized_keys file with the following:
632 .sp
633 .nf
634   from="amanda_server\&.your\&.domain\&.com",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,command="/absolute/path/to/amandad \-auth=ssh amdump"
635 .fi
636 .PP
637 This will limit that key to connect only from Amanda server and only be able to execute
638 \fBamandad\fR(8)\&.
639 .PP
640 In the same way, prepend the key used for AMANDA in the server\'s authorized_keys file with:
641 .sp
642 .nf
643   from="amanda_client\&.your\&.domain\&.com",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,command="/absolute/path/to/amandad \-auth=ssh amindexd amidxtaped"
644 .fi
645 .PP
646 You can omit the from=\&.\&. option if you have too many clients to list, although this has obvious security implications\&.
647 .PP
648 Set ssh_keys and any other necessary options in /etc/amanda/amanda_client\&.conf:
649 .sp
650 .nf
651   auth "ssh"
652   ssh_keys "/root/\&.ssh/id_rsa_amrecover"
653   client_username "amanda"
654   amandad_path "/server/amandad/path"
655 .fi
656 .PP
657 Besides user keys, SSH uses host keys to uniquely identify each host, to prevent one host from impersonating another\&. Unfortunately, the only easy way to set up these host keys is to make a connection and tell SSH that you trust the identity:
658 .sp
659 .nf
660   $ ssh client1\&.zmanda\&.com
661   The authenticity of host \'client1\&.zmanda\&.com (192\&.168\&.10\&.1)\' can\'t be established\&.
662   RSA key fingerprint is 26:4e:df:a2:be:c8:cb:20:1c:68:8b:cc:c0:3b:8e:9d\&.
663   Are you sure you want to continue connecting (yes/no)?yes
664 .fi
665 .PP
666 As Amanda will not answer this question itself, you must manually make every connection (server to client and client to server) that you expect Amanda to make\&. Note that you must use the same username that Amanda will use (that is, ssh client and ssh client\&.domain\&.com are distinct)\&.
667 .SH "SEE ALSO"
668 .PP
669 \fBamanda\fR(8),
670 \fBamanda.conf\fR(5),
671 \fBamanda-client.conf\fR(5),
672 \fBdisklist\fR(5),
673 \fBamdump\fR(8),
674 \fBamrecover\fR(8)
675 .PP
676 The Amanda Wiki:
677 : http://wiki.zmanda.com/
678 .SH "AUTHORS"
679 .PP
680 \fBJean\-Louis Martineau\fR <\&martineau@zmanda\&.com\&>
681 .RS 4
682 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
683 .RE
684 .PP
685 \fBDustin J\&. Mitchell\fR <\&dustin@zmanda\&.com\&>
686 .RS 4
687 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
688 .RE
689 .PP
690 \fBPaul Yeatman\fR <\&pyeatman@zmanda\&.com\&>
691 .RS 4
692 Zmanda, Inc\&. (http://www\&.zmanda\&.com)
693 .RE