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.
Parameters
Parameter | Description | Value |
---|---|---|
hours | Specifies the interval for updating the server key pair. | The value is an integer that ranges from 1 to 24, in hours. |
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 this command, the system will automatically update the key pair at intervals.
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.