1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 01:27:35 -05:00

Add -pw and -P options, and usage/version message, to plink

[originally from svn r650]
This commit is contained in:
Simon Tatham
2000-09-29 08:56:30 +00:00
parent 960c03468d
commit 0e9b76540b
2 changed files with 33 additions and 5 deletions

4
ssh.c
View File

@ -1455,7 +1455,7 @@ static int do_ssh1_login(unsigned char *in, int inlen, int ispkt)
free(comment);
}
if (!(flags & FLAG_INTERACTIVE)) {
if (ssh_get_password) {
if (!ssh_get_password(prompt, password, sizeof(password))) {
/*
* get_password failed to get a password (for
@ -2193,7 +2193,7 @@ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt)
}
}
if (!(flags & FLAG_INTERACTIVE)) {
if (ssh_get_password) {
char prompt[200];
sprintf(prompt, "%.90s@%.90s's password: ", cfg.username, savedhost);
if (!ssh_get_password(prompt, password, sizeof(password))) {