summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-10-06 11:18:20 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-10-06 11:18:20 +0000
commit812f60eec77e0f8943cdd977cf7345934957c5f1 (patch)
tree7f883c184982c9f537e63f0d6f705473cf12f108 /usr.bin
parentaad314179fec50d466fe7be79d639296622fa41a (diff)
unify hostkey check error messages, simplify prompt.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshconnect.c8
-rw-r--r--usr.bin/ssh/sshconnect1.c4
-rw-r--r--usr.bin/ssh/sshconnect2.c4
3 files changed, 7 insertions, 9 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 2c61af35177..b9e6012919a 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.112 2001/10/06 00:14:50 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.113 2001/10/06 11:18:19 markus Exp $");
#include <openssl/bn.h>
@@ -498,8 +498,8 @@ confirm(const char *prompt)
if (f == NULL)
return 0;
fflush(stdout);
+ fprintf(stderr, "%s", prompt);
while (1) {
- fprintf(stderr, "%s", prompt);
if (fgets(buf, sizeof(buf), f) == NULL) {
fprintf(stderr, "\n");
strlcpy(buf, "no", sizeof buf);
@@ -512,7 +512,7 @@ confirm(const char *prompt)
else if (strcmp(buf, "no") == 0)
retval = 0;
else
- fprintf(stderr, "Please type 'yes' or 'no'.\n");
+ fprintf(stderr, "Please type 'yes' or 'no': ");
if (retval != -1) {
if (f != stdin)
@@ -691,7 +691,6 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
"(yes/no)? ", host, ip, type, fp);
xfree(fp);
if (!confirm(prompt)) {
- log("Aborted by user!");
goto fail;
}
}
@@ -809,7 +808,6 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key,
} else if (options.strict_host_key_checking == 2) {
if (!confirm("Are you sure you want "
"to continue connecting (yes/no)? ")) {
- log("Aborted by user!");
goto fail;
}
}
diff --git a/usr.bin/ssh/sshconnect1.c b/usr.bin/ssh/sshconnect1.c
index 05cd9f6d688..d6b86235296 100644
--- a/usr.bin/ssh/sshconnect1.c
+++ b/usr.bin/ssh/sshconnect1.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect1.c,v 1.40 2001/09/27 15:31:17 markus Exp $");
+RCSID("$OpenBSD: sshconnect1.c,v 1.41 2001/10/06 11:18:19 markus Exp $");
#include <openssl/bn.h>
#include <openssl/evp.h>
@@ -982,7 +982,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr)
k.type = KEY_RSA1;
k.rsa = host_key;
if (verify_host_key(host, hostaddr, &k) == -1)
- fatal("host_key verification failed");
+ fatal("Host key verification failed.");
client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN;
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index a7beb3600eb..705aa4561ae 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.82 2001/08/31 11:46:39 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.83 2001/10/06 11:18:19 markus Exp $");
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -75,7 +75,7 @@ static int
verify_host_key_callback(Key *hostkey)
{
if (verify_host_key(xxx_host, xxx_hostaddr, hostkey) == -1)
- fatal("verify_host_key failed");
+ fatal("Host key verification failed.");
return 0;
}