You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Please correct me if I'm wrong, but it looks like SSHJ does not handle the case of the OpenSSH known_hosts file having multiple entries for the same server. This can end up in practice due to new keys (or even due to servers behind a load balancer perhaps).
The following code in OpenSSHKnownHosts:verify seems to be doing the verification:
try {
if (e.appliesTo(type, adjustedHostname))
returne.verify(key) || hostKeyChangedAction(e, adjustedHostname, key);
} catch (IOExceptionioe) {
log.error("Error with {}: {}", e, ioe);
returnfalse;
}
However, openssh itself seems to handle this by trying all keys that match the server, and validates if any of them match.
Am I missing something here? If the above diagnosis is correct, I'd be happy to submit a PR :)
The text was updated successfully, but these errors were encountered:
Hi,
Please correct me if I'm wrong, but it looks like SSHJ does not handle the case of the OpenSSH known_hosts file having multiple entries for the same server. This can end up in practice due to new keys (or even due to servers behind a load balancer perhaps).
The following code in
OpenSSHKnownHosts:verify
seems to be doing the verification:However, openssh itself seems to handle this by trying all keys that match the server, and validates if any of them match.
Am I missing something here? If the above diagnosis is correct, I'd be happy to submit a PR :)
The text was updated successfully, but these errors were encountered: