Technical data

Configuring and Managing NTP
12.7 NTP Authentication Support
12.7.1 NTP Authentication Commands
Table 12–2 describes additional configuration statements and options used to
support authentication.
Table 12–2 Authentication Commands
Command Description
keys
keys-file Specifies the file name for the keys file, which contains the
encryption keys and key identifiers used by NTP, NTPQ, and
NTPDC when operating in authenticated mode.
trustedkey
key-ID [...] Specifies the encryption key identifiers that are trusted for the
purposes of authenticating peers suitable for synchronization,
as well as keys used by the NTPQ and NTPDC programs. The
authentication procedures require that the local and remote
servers share the same key-ID and key value for this purpose,
although different key values can be used with different
servers. The key-ID arguments are 32-bit unsigned decimal
integers from 1 to 15. Note that the NTP key 0 is used to
indicate an invalid key value or key identifier; therefore, it
should not be used for any other purpose.
requestkey
key-ID Specifies the key identifier to use with the NTPDC
program, which uses a proprietary protocol specific to this
implementation of NTP. This program is useful to diagnose
and repair problems that affect the operation of NTP. For
information about NTPDC, see Section 12.8.3.
The key-ID argument to this command is an unsigned 32-bit
decimal number that identifies the trusted key in the keys file.
If no
requestkey
command is included in the configuration
file, or if the keys do not match, any request to change a server
variable is denied.
controlkey
key-ID Specifies the key identifier to use with the NTPQ program,
which uses the standard protocol defined in RFC-1305. This
program is useful to diagnose and repair problems that affect
the operation of NTP. For more information about NTPQ, see
Section 12.8.4.
The key-ID argument to this command is a 32-bit decimal
integer that identifies a trusted key in the keys file. If no
controlkey
command is included in the configuration file,
or if the keys do not match, any request to change a server
variable is denied.
Keys are defined in a keys file, as described in Section 12.7.2.
12.7.2 Authentication Key Format
The NTP service reads keys from a keys file that is specified using the
keys
command in the configuration file. You can supply one or more keys from 1 to 15
in the keys file.
Key entries use the following format:
key-ID key-type key-value
12–14 Configuring and Managing NTP