--- /sys/src/cmd/ssh2/netssh.c +++ /sys/src/cmd/ssh2/netssh.c @@ -2875,7 +2875,6 @@ char *alg, char *blob, char *sig, char *service, char *me) { int n, thisway, nblob, nsig; - char method[32]; sshdebug(c, "auth_req publickey for user %s", user); thisway = *q == '\0'; @@ -2912,12 +2911,12 @@ add_byte(p2, SSH_MSG_USERAUTH_REQUEST); add_string(p2, user); add_string(p2, service); - add_string(p2, method); + add_string(p2, "publickey"); add_byte(p2, 1); add_string(p2, alg); add_block(p2, blob, nblob); if (pkas[n]->verify(c, p2->payload, p2->rlength - 1, user, sig, nsig) - == 0) { + != 1) { init_packet(p2); p2->c = c; sshlog(c, "public key login failed");