1.. Copyright (C) Internet Systems Consortium, Inc. ("ISC") 2.. 3.. SPDX-License-Identifier: MPL-2.0 4.. 5.. This Source Code Form is subject to the terms of the Mozilla Public 6.. License, v. 2.0. If a copy of the MPL was not distributed with this 7.. file, you can obtain one at https://mozilla.org/MPL/2.0/. 8.. 9.. See the COPYRIGHT file distributed with this work for additional 10.. information regarding copyright ownership. 11 12.. highlight: console 13 14.. _man_dnssec-importkey: 15 16dnssec-importkey - import DNSKEY records from external systems so they can be managed 17------------------------------------------------------------------------------------- 18 19Synopsis 20~~~~~~~~ 21 22:program:`dnssec-importkey` [**-K** directory] [**-L** ttl] [**-P** date/offset] [**-P** sync date/offset] [**-D** date/offset] [**-D** sync date/offset] [**-h**] [**-v** level] [**-V**] {keyfile} 23 24:program:`dnssec-importkey` {**-f** filename} [**-K** directory] [**-L** ttl] [**-P** date/offset] [**-P** sync date/offset] [**-D** date/offset] [**-D** sync date/offset] [**-h**] [**-v** level] [**-V**] [dnsname] 25 26Description 27~~~~~~~~~~~ 28 29``dnssec-importkey`` reads a public DNSKEY record and generates a pair 30of .key/.private files. The DNSKEY record may be read from an 31existing .key file, in which case a corresponding .private file is 32generated, or it may be read from any other file or from the standard 33input, in which case both .key and .private files are generated. 34 35The newly created .private file does *not* contain private key data, and 36cannot be used for signing. However, having a .private file makes it 37possible to set publication (``-P``) and deletion (``-D``) times for the 38key, which means the public key can be added to and removed from the 39DNSKEY RRset on schedule even if the true private key is stored offline. 40 41Options 42~~~~~~~ 43 44``-f filename`` 45 This option indicates the zone file mode. Instead of a public keyfile name, the argument is the 46 DNS domain name of a zone master file, which can be read from 47 ``filename``. If the domain name is the same as ``filename``, then it may be 48 omitted. 49 50 If ``filename`` is set to ``"-"``, then the zone data is read from the 51 standard input. 52 53``-K directory`` 54 This option sets the directory in which the key files are to reside. 55 56``-L ttl`` 57 This option sets the default TTL to use for this key when it is converted into a 58 DNSKEY RR. This is the TTL used when the key is imported into a zone, 59 unless there was already a DNSKEY RRset in 60 place, in which case the existing TTL takes precedence. Setting the default TTL to ``0`` or ``none`` 61 removes it from the key. 62 63``-h`` 64 This option emits a usage message and exits. 65 66``-v level`` 67 This option sets the debugging level. 68 69``-V`` 70 This option prints version information. 71 72Timing Options 73~~~~~~~~~~~~~~ 74 75Dates can be expressed in the format YYYYMMDD or YYYYMMDDHHMMSS. If the 76argument begins with a ``+`` or ``-``, it is interpreted as an offset from 77the present time. For convenience, if such an offset is followed by one 78of the suffixes ``y``, ``mo``, ``w``, ``d``, ``h``, or ``mi``, then the offset is 79computed in years (defined as 365 24-hour days, ignoring leap years), 80months (defined as 30 24-hour days), weeks, days, hours, or minutes, 81respectively. Without a suffix, the offset is computed in seconds. To 82explicitly prevent a date from being set, use ``none`` or ``never``. 83 84``-P date/offset`` 85 This option sets the date on which a key is to be published to the zone. After 86 that date, the key is included in the zone but is not used 87 to sign it. 88 89``-P sync date/offset`` 90 This option sets the date on which CDS and CDNSKEY records that match this key 91 are to be published to the zone. 92 93``-D date/offset`` 94 This option sets the date on which the key is to be deleted. After that date, the 95 key is no longer included in the zone. (However, it may remain in the key 96 repository.) 97 98``-D sync date/offset`` 99 This option sets the date on which the CDS and CDNSKEY records that match this 100 key are to be deleted. 101 102Files 103~~~~~ 104 105A keyfile can be designed by the key identification ``Knnnn.+aaa+iiiii`` 106or the full file name ``Knnnn.+aaa+iiiii.key``, as generated by 107``dnssec-keygen``. 108 109See Also 110~~~~~~~~ 111 112:manpage:`dnssec-keygen(8)`, :manpage:`dnssec-signzone(8)`, BIND 9 Administrator Reference Manual, 113:rfc:`5011`. 114