*/
#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>
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);
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(