9.72.1.3 SCP Agents Server Keys
The SSH protocol uses host verification to guard against attacks where an attacker manages to reroute the TCP connection from the correct server to another machine. Since the password is sent directly over the encrypted connection, it is critical for security that an incorrect public key is not accepted by the client.
The agent uses a file with the known hosts and keys. It will accept the key supplied by the server if either of the following is fulfilled:
The host is previously unknown. In this case the public key will be registered in the file.
The host is known and the public key matches the old data.
The host is known however has a new key and the user has configured to accept the new key. For further information, see the description of the Advanced tab.
If the host key changes for some reason, the file will have to be removed (or edited) in order for the new key to be accepted.