< Home

ssh server rekey-interval

Function

The ssh server rekey-interval command sets the interval for updating the SSH server key pair.

The undo ssh server rekey-interval command restores the default interval for updating the SSH server key pair.

The default interval for updating the SSH server key pair is 0, indicating that the key pair is never updated.

Format

ssh server rekey-interval hours

undo ssh server rekey-interval

Parameters

Parameter Description Value
hours Specifies the interval for updating the server key pair. The value is an integer that ranges from 0 to 24, in hours.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

If the server key pair is not updated for a long time, the key is easy to decrypt, and the server is insecure. After the interval for updating the SSH server key pair is set using the ssh server rekey-interval command, the device will automatically update the key pair at the specified interval.

Precautions

If the client is connected to the server, the server public key on the client is not updated immediately. This key is updated only when the client is reconnected to the server.

This command takes effect only for SSH1.X. However, SSH1.X provides poor security and is therefore not recommended.

Example

# Set the interval for updating the SSH server key pair to 2 hours.

<HUAWEI> system-view
[HUAWEI] ssh server rekey-interval 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >