'Called when we receive a MSG_KEXINIT message.  For a description
of the packet, see SSHTransportBase.ssh_KEXINIT().  Additionally,
this method checks if a guessed key exchange packet was sent.  If
it was sent, and it guessed incorrectly, the next key exchange
packet MUST be ignored.'

def ssh_KEXINIT(self, packet):

    retval = SSHTransportBase.ssh_KEXINIT(self, packet)
    if (not retval):
        return
    else:
        (kexAlgs, keyAlgs, rest) = retval
    if ord(rest[0:1]):
        if ((kexAlgs[0] != self.supportedKeyExchanges[0]) or (keyAlgs[0] != self.supportedPublicKeys[0])):
            self.ignoreNextPacket = True
