=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshconnect2.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/ssh/sshconnect2.c 2000/04/27 08:01:27 1.3 +++ src/usr.bin/ssh/sshconnect2.c 2000/04/27 17:54:01 1.4 @@ -28,7 +28,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.3 2000/04/27 08:01:27 markus Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.4 2000/04/27 17:54:01 markus Exp $"); #include #include @@ -330,8 +330,6 @@ } dsa_make_key_blob(k, &blob, &bloblen); -//DSA_print_fp(stderr, k->dsa, 8); - /* data to be signed */ buffer_init(&b); buffer_append(&b, session_id2, session_id2_len); @@ -425,7 +423,8 @@ packet_done(); if (partial) debug("partial success"); - if (strstr(auths, "publickey") != NULL) { + if (options.rsa_authentication && + strstr(auths, "publickey") != NULL) { while (i < options.num_identity_files2) { sent = ssh2_try_pubkey( options.identity_files2[i++], @@ -435,14 +434,14 @@ } } if (!sent) { - if (strstr(auths, "password") != NULL) { + if (options.password_authentication && + !options.batch_mode && + strstr(auths, "password") != NULL) { sent = ssh2_try_passwd(server_user, host, service); - } else { - fatal("passwd auth not supported: %s", auths); } - if (!sent) - fatal("no more auths: %s", auths); } + if (!sent) + fatal("Permission denied (%s).", auths); xfree(auths); } packet_done();