Igor Bukanov
2016-Jan-23 11:18 UTC
unexpected HostKeyAgent and HostKeyAlgorithms interaction
Hi, I use HostKeyAgent in sshd_config for sshd 7.1. If I have HostKeyAgent without any HostKey directives, then ssh 7.1 client, after connecting to the server using client ED25519 key, stores in ~/.ssh/known_hosts : host ecdsa-sha2-nistp256 public-key If I add then to sshd_config HostKey pointing to the ED25519 public key to restrict the list of keys from the ssh-agent that the server uses, then the client stores in ~/.ssh/known_hosts: host ssh-ed25519 ... As the result, if after adding HostKey I connect to the server, the client reports remote host identification change and refuse the connection as it thinks it gets a different server key. I can workaround that with a recently added explicit HostKeyAlgorithms that just lists ssh-ed25519,ssh-rsa. Then known_hosts always uses host ssh-ed25519 even without HostKey in the config. Still I am puzzled why presence of HostKey influences HostKeyAlgorithms at all? I really expected that it should just restrict the keys from the agent. Regards, Igor