summaryrefslogtreecommitdiffstats
path: root/sshconnect2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index a4342e2d..17325b09 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -28,7 +28,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.5 2000/05/01 18:41:06 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.7 2000/05/06 17:45:37 markus Exp $");
#include <openssl/bn.h>
#include <openssl/rsa.h>
@@ -283,9 +283,13 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
int
ssh2_try_passwd(const char *server_user, const char *host, const char *service)
{
+ static int attempt = 0;
char prompt[80];
char *password;
+ if (attempt++ > options.number_of_password_prompts)
+ return 0;
+
snprintf(prompt, sizeof(prompt), "%.30s@%.40s's password: ",
server_user, host);
password = read_passphrase(prompt, 0);
@@ -428,7 +432,7 @@ ssh_userauth2(const char *server_user, char *host)
packet_done();
if (partial)
debug("partial success");
- if (options.rsa_authentication &&
+ if (options.dsa_authentication &&
strstr(auths, "publickey") != NULL) {
while (i < options.num_identity_files2) {
sent = ssh2_try_pubkey(