version 1.66, 2000/04/12 09:39:10 |
version 1.67, 2000/04/14 10:09:16 |
|
|
debug("first kex follow == %d", i); |
debug("first kex follow == %d", i); |
i = packet_get_int(); |
i = packet_get_int(); |
debug("reserved == %d", i); |
debug("reserved == %d", i); |
|
packet_done(); |
|
|
debug("done read kexinit"); |
debug("done read kexinit"); |
kex = kex_choose_conf(cprop, sprop, 0); |
kex = kex_choose_conf(cprop, sprop, 0); |
|
|
|
|
/* signed H */ |
/* signed H */ |
signature = packet_get_string(&slen); |
signature = packet_get_string(&slen); |
|
packet_done(); |
|
|
if (!dh_pub_is_valid(dh, dh_server_pub)) |
if (!dh_pub_is_valid(dh, dh_server_pub)) |
packet_disconnect("bad server public DH value"); |
packet_disconnect("bad server public DH value"); |
|
|
|
|
debug("Wait SSH2_MSG_NEWKEYS."); |
debug("Wait SSH2_MSG_NEWKEYS."); |
packet_read_expect(&payload_len, SSH2_MSG_NEWKEYS); |
packet_read_expect(&payload_len, SSH2_MSG_NEWKEYS); |
|
packet_done(); |
debug("GOT SSH2_MSG_NEWKEYS."); |
debug("GOT SSH2_MSG_NEWKEYS."); |
|
|
debug("send SSH2_MSG_NEWKEYS."); |
debug("send SSH2_MSG_NEWKEYS."); |
|
|
char *server_user, *local_user; |
char *server_user, *local_user; |
char *auths; |
char *auths; |
char *password; |
char *password; |
char *service = "ssh-connection"; // service name |
char *service = "ssh-connection"; /* service name */ |
|
|
debug("send SSH2_MSG_SERVICE_REQUEST"); |
debug("send SSH2_MSG_SERVICE_REQUEST"); |
packet_start(SSH2_MSG_SERVICE_REQUEST); |
packet_start(SSH2_MSG_SERVICE_REQUEST); |
|
|
if (type != SSH2_MSG_SERVICE_ACCEPT) { |
if (type != SSH2_MSG_SERVICE_ACCEPT) { |
fatal("denied SSH2_MSG_SERVICE_ACCEPT: %d", type); |
fatal("denied SSH2_MSG_SERVICE_ACCEPT: %d", type); |
} |
} |
/* payload empty for ssh-2.0.13 ?? */ |
if (packet_remaining() > 0) { |
/* reply = packet_get_string(&payload_len); */ |
char *reply = packet_get_string(&plen); |
|
debug("service_accept: %s", reply); |
|
xfree(reply); |
|
} else { |
|
/* payload empty for ssh-2.0.13 ?? */ |
|
log("buggy server: service_accept w/o service"); |
|
} |
|
packet_done(); |
debug("got SSH2_MSG_SERVICE_ACCEPT"); |
debug("got SSH2_MSG_SERVICE_ACCEPT"); |
|
|
/*XX COMMONCODE: */ |
/*XX COMMONCODE: */ |
|
|
auths = packet_get_string(&dlen); |
auths = packet_get_string(&dlen); |
debug("authentications that can continue: %s", auths); |
debug("authentications that can continue: %s", auths); |
partial = packet_get_char(); |
partial = packet_get_char(); |
|
packet_done(); |
if (partial) |
if (partial) |
debug("partial success"); |
debug("partial success"); |
if (strstr(auths, "password") == NULL) |
if (strstr(auths, "password") == NULL) |
|
|
packet_send(); |
packet_send(); |
packet_write_wait(); |
packet_write_wait(); |
} |
} |
|
packet_done(); |
debug("ssh-userauth2 successfull"); |
debug("ssh-userauth2 successfull"); |
} |
} |
|
|