accept-lifetime

Defines the time period when a key is active.

Syntax

accept-lifetime [ local { true | false}] { start-time | infinite | end-time }
no accept-lifetime

Command Default

By default, the key lifetime is infinite. The key is always valid.

Parameters

local { true | false}
By default, the device treats the start time and end time as UTC. Specify the local key word to use local times.
start-time
Specifies the time of day and date when the key becomes active. In HH:MM:SS|MM/DD/YYYY format.
end-time
Specifies the time of day and date when the key expires. In HH:MM:SS|MM/DD/YYYY format.
infinite
Indicates that the accept lifetime of the key never expires.

Modes

Key configuration mode

Usage Guidelines

Use the no form of the command to revert to the default lifetime.

Examples

The following example configures a lifetime from June 6 2020 to December 4 2020 (UTC) for key 10 in key chain 1.

device# configure terminal
device(config)# keychain keychain1
device(config-keychain1)# key 10
device(config-keychain1-key10)# accept-lifetime 00:00:00|06/04/2020 23:59:59|12/04/2020 

The following example configures a lifetime from June 6 2020 to December 4 2020 (local) for key 10 in key chain 1.

device# configure terminal
device(config)# keychain keychain1
device(config-keychain1)# key 10
device(config-keychain1-key10)# accept-lifetime local true 00:00:00|06/04/2020 23:59:59|12/04/2020