clear ssh hosts

Use this command to clear the known_hosts file.

This command clears all trusted relationships established with SSH servers during previous connections. When a client downloads a file from an external server the first time, the client stores the server keys in the known_hosts file. After that, other connections to the same server will use the server keys stored in the known_hosts file. In other words, a trusted relationship is created when a client accepts the server keys the first time.

An example of when you need to clear a trusted relationship is when SSH server keys are changed.

Command Syntax

Copy
clear ssh hosts

Parameters

None

Command Mode

Execution mode

Applicability

This command was introduced before OcNOS version 1.3.

Examples

Copy
#clear ssh hosts