ssh_bind_parse_config should handle HostKey like OpenSSH
For compatibility, I'd like to read in the OpenSSH sshd_config file to use most of the same configuration options:
ssh_bind_options_parse_config(bind, "/etc/ssh/sshd_config");
However, there is a difference in the way HostKey
works. OpenSSH uses /etc/ssh/ssh_host_ecdsa_key
, /etc/ssh/ssh_host_ed25519_key
and /etc/ssh/ssh_host_rsa_key
as values if there is no HostKey
set, and only the explicitly mentioned HostKey
values otherwise.
ssh_bind_options_parse_config
doesn't have any builtin default (i.e. no host keys configured if no HostKey
mentioned) and it's also not possible to emulate the behaviour by setting SSH_BIND_OPTIONS_HOSTKEY
before parsing, as those would not be completely overwritten by ssh_bind_options_parse_config
.