summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>1999-09-29 15:52:56 +0000
committerNiels Provos <provos@cvs.openbsd.org>1999-09-29 15:52:56 +0000
commita40718a96a18d0455c229daab8b4fd037633c95f (patch)
tree9078e9de2f3c623e231e2bbd243153a125115b2e /usr.bin
parentb40746f0bf85e79605c2c859c3b105502e37b8ee (diff)
print username and host in password prompt
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshconnect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index a37c8b14978..1f276f08fc5 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -15,7 +15,7 @@ login (authentication) dialog.
*/
#include "includes.h"
-RCSID("$Id: sshconnect.c,v 1.3 1999/09/28 04:45:37 provos Exp $");
+RCSID("$Id: sshconnect.c,v 1.4 1999/09/29 15:52:55 provos Exp $");
#include <ssl/bn.h>
#include "xmalloc.h"
@@ -1400,10 +1400,13 @@ void ssh_login(int host_key_valid,
if ((supported_authentications & (1 << SSH_AUTH_PASSWORD)) &&
options->password_authentication && !options->batch_mode)
{
+ char prompt[80];
+ snprintf(prompt, sizeof(prompt), "%.30s@%.30s's password: ",
+ server_user, host);
debug("Doing password authentication.");
if (options->cipher == SSH_CIPHER_NONE)
log("WARNING: Encryption is disabled! Password will be transmitted in clear text.");
- password = read_passphrase("Password: ", 0);
+ password = read_passphrase(prompt, 0);
packet_start(SSH_CMSG_AUTH_PASSWORD);
packet_put_string(password, strlen(password));
memset(password, 0, strlen(password));