ntp authentication-key

Syntax

ntp authentication-key <KEY-ID> {md5 | sha1} <PASSWORD> [trusted]

no ntp authentication-key <KEY-ID>

Description

Defines an authentication key that is used to secure the exchange with an NTP time server. This command provides protection against accidentally synchronizing to a time source that is not trusted.

The no form of this command removes an authentication key.

Command context

config

Parameters

authentication-key <KEY-ID>

Specifies an identification number to uniquely identify the key. Range: 1 to 65534.

md5

Specifies md5 encryption to protect the key.

sh1

Specifies sh1 encryption to protect the key

<PASSWORD>

Specifies the md5 or sh1 password associated with the key. Range: 8 to 16 characters.

trusted

Specifies that this is a trusted key. When NTP authentication is enabled, the switch only synchronizes with time servers that transmit packets containing a trusted key.

Authority

Administrators

Examples

Defining key 10 with the md5 password myPassword as a trusted key:

switch(config)# ntp authentication-key 10 md5 myPassword trusted

Removing key 10:

switch(config)# no ntp authentication-key 10