ntp authentication-key

To specify an authentication key for a time source, use the ntp authentication-key command in configuration command with a unique identifier and a key value.

To disable this capability, use the no form of this command.

ntp authentication-key <key id> md5 hash | plain <key value>

Syntax Description

ntp

The command to specify NTP configuration.

authentication-key

Configures authentication keys for trusted time sources.

key id

The identifier that you want to assign to this key. Supports numeric values from 1–65535.

md5

The encryption type for the authentication key.

hash <word>

Hashed key for authentication. Specifies an encrypted (hashed) key that follows the encryption type. Supports up to 40 characters.

plain <word>

Plaintext key for authentication. Specifies an unencrypted plaintext key that follows the encryption type. Supports up to 15 characters.

<key value>

The key value in the format matching either md5 plain | hash, above.

Defaults

None

Command Modes

Configuration.

Usage Guidelines

Use the ntp authentication-key command to set up a time source with an authentication key for NTP authentication and specify its pertinent key identifier, key encryption type, and key value settings. Add this key to the trusted list before you add this key to the ntp server command.

Time sources without the NTP authentication keys that are added to the trusted list will not be synchronized.

Examples

/admin# configure

/admin(config)#

/admin(config)# ntp authentication-key 1 md5 plain SharedWithServe

/admin(config)# ntp authentication-key 2 md5 plain SharedWithServ

/admin(config)# ntp authentication-key 3 md5 plain SharedWithSer

 

Note The show running-config command will always show keys that are entered in Message Digest 5 (MD5) plain format converted into hash format for security. For example, ntp authentication-key 1 md5 hash ee18afc7608ac7ecdbeefc5351ad118bc9ce1ef3.

/admin(config)# no ntp authentication-key 3

(Removes authentication key 3.)

/admin(config)# no ntp authentication-key

(Removes all authentication keys.)

Related Commands

Command

Description

ntp

The command to specify NTP configuration.

ntp authenticate

Enables authentication of all time sources.

ntp server

Allows synchronization of the software clock by the NTP server for the system.

ntp trusted-key

Specifies key numbers for trusted time sources that needs to be defined as NTP authentication keys.

show ntp

Displays the status information about the NTP associations.