diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-04-27 17:54:02 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-04-27 17:54:02 +0000 |
commit | da6db4f8298898108e980f5ae810fd9ef573ef25 (patch) | |
tree | ef6eb0bdc1249073b4634b57ef18fe3fbf14030a /usr.bin | |
parent | 8ed111e56778257c790d8d272348a254594033ed (diff) |
less debug, respect .ssh/config
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 1b64fb9e47e..31ef3084c87 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -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 <openssl/bn.h> #include <openssl/rsa.h> @@ -330,8 +330,6 @@ ssh2_try_pubkey(char *filename, } 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 @@ ssh_userauth2(const char *server_user, char *host) 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 @@ ssh_userauth2(const char *server_user, char *host) } } 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(); |