@ -57,7 +57,6 @@ import java.util.Set;
import org.apache.sshd.client.ClientFactoryManager ;
import org.apache.sshd.client.ClientFactoryManager ;
import org.apache.sshd.client.config.hosts.HostConfigEntry ;
import org.apache.sshd.client.config.hosts.HostConfigEntry ;
import org.apache.sshd.client.keyverifier.KnownHostsServerKeyVerifier.HostEntryPair ;
import org.apache.sshd.client.keyverifier.ServerKeyVerifier ;
import org.apache.sshd.client.keyverifier.ServerKeyVerifier ;
import org.apache.sshd.client.session.ClientSessionImpl ;
import org.apache.sshd.client.session.ClientSessionImpl ;
import org.apache.sshd.common.FactoryManager ;
import org.apache.sshd.common.FactoryManager ;
@ -293,11 +292,10 @@ public class JGitClientSession extends ClientSessionImpl {
if ( verifier instanceof ServerKeyLookup ) {
if ( verifier instanceof ServerKeyLookup ) {
SocketAddress remoteAddress = resolvePeerAddress (
SocketAddress remoteAddress = resolvePeerAddress (
resolveAttribute ( JGitSshClient . ORIGINAL_REMOTE_ADDRESS ) ) ;
resolveAttribute ( JGitSshClient . ORIGINAL_REMOTE_ADDRESS ) ) ;
List < HostEntryPair > allKnownKeys = ( ( ServerKeyLookup ) verifier )
List < PublicKey > allKnownKeys = ( ( ServerKeyLookup ) verifier )
. lookup ( this , remoteAddress ) ;
. lookup ( this , remoteAddress ) ;
Set < String > reordered = new LinkedHashSet < > ( ) ;
Set < String > reordered = new LinkedHashSet < > ( ) ;
for ( HostEntryPair h : allKnownKeys ) {
for ( PublicKey key : allKnownKeys ) {
PublicKey key = h . getServerKey ( ) ;
if ( key ! = null ) {
if ( key ! = null ) {
String keyType = KeyUtils . getKeyType ( key ) ;
String keyType = KeyUtils . getKeyType ( key ) ;
if ( keyType ! = null ) {
if ( keyType ! = null ) {