--- sshconnect2.c.orig 2007-02-05 13:34:10.986163640 +0100 +++ sshconnect2.c 2007-02-05 13:34:52.068536086 +0100 @@ -530,6 +530,7 @@ static u_int mech = 0; OM_uint32 min; int ok = 0; + const char* remotehost = get_canonical_hostname(1); /* Try one GSSAPI method at a time, rather than sending them all at * once. */ @@ -542,7 +543,7 @@ /* My DER encoding requires length<128 */ if (gss_supported->elements[mech].length < 128 && ssh_gssapi_check_mechanism(&gssctxt, - &gss_supported->elements[mech], authctxt->host)) { + &gss_supported->elements[mech], remotehost)) { ok = 1; /* Mechanism works */ } else { mech++;