After upgrading our control server to Ubuntu 16.04 LTS I do not get a key response from ssh-keyscan from some legacy hosts anymore while others with the same OpenSSH revision work OK.
Here is a sample output where you can see that in the first query there is just the SSH version displayed but no key part.
The queried hosts are all HP-UX 10.20 with OpenSSH 4.1
ssh-keyscan -t rsa -4 host1 # host1:22 SSH-2.0-OpenSSH_4.1 ssh-keyscan -t rsa -4 host2 # host2:22 SSH-2.0-OpenSSH_4.1 host2 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAswUwKzs87EU9Q7gVGIyupZowMT1o8FB+u/DKAy6sgjyZ8/RBGwl0R7DIdNw5U6E9sAwE5tyB4CQp2G39o8YpHDo75co9+ALULiRC+xqaGmvMtY7aipHzlOyE6Sa0t0xKcfPXsk2ekq46S84vzhWy3yIJCHVbTBjiN4NXv96gPBU=
If I do the same on host1 from an Ubuntu 14.04.5 LTS it works
ssh-keyscan -t rsa host1 # host1 SSH-2.0-OpenSSH_4.1 host11 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAtBAPXd7KxHoKH52Q8jwPKRM2m9TFdivAyizkOTj7m0YHqdNjohLz6ID/7jlsq+8ou9KjSydpukiwc5goNutb2ndsAd/5+XcqRAGt1TyMxVAF0X5uFoic0QW3AvBORvIkhym36CS2ivMkaYkHaCn9k8XjbVjzXLW4+xmkplWdjXU=
I have no clue what is going on and I am looking for a workaround to solve the issue.
I have filed a bug on launchpad on this where I also added the output of the -vv option which shows that there is just no reply on the request of the key
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
Whereas on the other system I get
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: got SSH2_MSG_KEX_DH_GEX_REPLY host2 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAswUwKzs87EU9Q7gVGIyupZowMT1o8FB+u/DKAy6sgjyZ8/RBGwl0R7DIdNw5U6E9sAwE5tyB4CQp2G39o8YpHDo75co9+ALULiRC+xqaGmvMtY7aipHzlOyE6Sa0t0xKcfPXsk2ekq46S84vzhWy3yIJCHVbTBjiN4NXv96gPBU=