summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2023-12-13 03:28:20 +0000
committerDamien Miller <djm@cvs.openbsd.org>2023-12-13 03:28:20 +0000
commitecca2db2a3568476452a17016ecbdfd21df460b1 (patch)
treef012893f25c13e3ab1691ac2a91c723071adf870 /usr.bin
parent02f8a3337b2621bc26c6f6a69ff13df2f6caf3b1 (diff)
when invoking KnownHostsCommand to determine the order of host key
algorithms to request, ensure that the hostname passed to the command is decorated with the port number for ports other than 22. This matches the behaviour of KnownHostsCommand when invoked to look up the actual host key. bz3643, ok dtucker@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshconnect2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 3bf4d6c1a27..a7198755fc6 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.368 2023/10/12 02:15:53 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.369 2023/12/13 03:28:19 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -135,7 +135,7 @@ order_hostkeyalgs(char *host, struct sockaddr *hostaddr, u_short port,
}
if (options.known_hosts_command != NULL) {
load_hostkeys_command(hostkeys, options.known_hosts_command,
- "ORDER", cinfo, NULL, host);
+ "ORDER", cinfo, NULL, hostname);
}
/*
* If a plain public key exists that matches the type of the best