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