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.
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. |
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.