ssh.c
26.6 KB
-
ssh: look for a key in known_hosts to set the key type for the handshake · 63b083e5
The server and client negotiate a single hostkey, but the "best" cipher may not be the one for which we have an entry in `known_hosts`. This can lead to us not finding the key in known_hosts even though we should be connecting. Instead here we look up the hostname with a nonsense key to perform a lookup in the known hosts and set that. This is roughly what the OpenSSH client does as well.
Carlos Martín Nieto committed