summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordtucker <dtucker>2012-09-06 11:20:39 +0000
committerdtucker <dtucker>2012-09-06 11:20:39 +0000
commit16695860d1ee2201f209234e40cec1e911e48c81 (patch)
tree91f1c78796139c59c50f7c682a497ed8580df9ad /ssh-keygen.c
parent6defa8d224f39591068e5d4608dcb85342fc74e8 (diff)
downloadopenssh-16695860d1ee2201f209234e40cec1e911e48c81.tar.gz
- djm@cvs.openbsd.org 2012/08/17 01:25:58
[ssh-keygen.c] print details of which host lines were deleted when using "ssh-keygen -R host"; ok markus@
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index a223ddc8..5060276d 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.216 2012/07/06 06:38:03 jmc Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.217 2012/08/17 01:25:58 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1088,8 +1088,14 @@ do_known_hosts(struct passwd *pw, const char *name)
ca ? " (CA key)" : "");
printhost(out, cp, pub, ca, 0);
}
- if (delete_host && !c && !ca)
- printhost(out, cp, pub, ca, 0);
+ if (delete_host) {
+ if (!c && !ca)
+ printhost(out, cp, pub, ca, 0);
+ else
+ printf("# Host %s found: "
+ "line %d type %s\n", name,
+ num, key_type(pub));
+ }
} else if (hash_hosts)
printhost(out, cp, pub, ca, 0);
} else {
@@ -1104,8 +1110,14 @@ do_known_hosts(struct passwd *pw, const char *name)
printhost(out, name, pub,
ca, hash_hosts && !ca);
}
- if (delete_host && !c && !ca)
- printhost(out, cp, pub, ca, 0);
+ if (delete_host) {
+ if (!c && !ca)
+ printhost(out, cp, pub, ca, 0);
+ else
+ printf("# Host %s found: "
+ "line %d type %s\n", name,
+ num, key_type(pub));
+ }
} else if (hash_hosts) {
for (cp2 = strsep(&cp, ",");
cp2 != NULL && *cp2 != '\0';