RFC 4251(https://tools.ietf.org/html/rfc4251) states,
The protocol provides the option that the server name - host key
association is not checked when connecting to the host for the first
The client has a local database that associates each host name (as typed by the user) with the corresponding public host key.
RFC 4419(https://tools.ietf.org/html/rfc4419) states,
The server responds with:
byte SSH_MSG_KEX_DH_GEX_REPLY string server public host key and certificates (K_S) mpint f string signature of H
My question is,
After the first time connecting, the client has got server's public host key.
Why does the server still send its host key to the client in SSH_MSG_KEX_DH_GEX_REPLY (K_S) ?