Displaying 3 results from an estimated 3 matches for "hostfile_check_key".
2012 Dec 27
3
[PATCH] hostfile: list known names (if any) for new hostkeys
...+ continue;
+ *cp2++ = 0;
+ current_host = cp;
+ } else {
+ current_host = lookup_host;
+ }
+
+ /* Move pointer past the hostname. */
cp = cp2;
/*
@@ -299,7 +306,14 @@ load_hostkeys(struct hostkeys *hostkeys, const char *host, const char *path)
continue;
}
}
- if (!hostfile_check_key(kbits, key, host, path, linenum))
+
+ /* Check if the key matches if we're looking for a key. */
+ if (lookup_key) {
+ if (!key_equal(lookup_key, key))
+ continue;
+ }
+
+ if (!hostfile_check_key(kbits, key, current_host, path, linenum))
continue;
debug3(&...
2004 Oct 03
0
[patch] tell user about hosts with same key
...shostlen);
+ thishost[thishostlen] = '\0';
+
+ /* Skip host name. */
+ cp = cp2;
+
+ /*
+ * Extract the key from the line. This will skip any leading
+ * whitespace. Ignore badly formatted lines.
+ */
+ if (!hostfile_read_key(&cp, &kbits, found))
+ continue;
+
+ if (!hostfile_check_key(kbits, found, thishost, filename, linenum))
+ continue;
+
+ /* Check if the current key is the same as the given key. */
+ if (key_equal(search_key, found)) {
+ /* Ok, they match. */
+ debug3("find_hosts_by_key: match line %d", linenum);
+ cp = thishost;
+ while (cp < thish...
2009 Sep 07
6
Question about Server Authentication
Hi guys,
I'm working on a project which concern SSH and there is something i don't understand about server authentication. So I explain my problem:
- When you authorize only RSA keys in the sshd_config on the server, you need to have the RSA public key of this server in the known_hosts file of the client. This is absolutely normal.
- When you authorize only DSA keys in the sshd_config