From: djm Date: Thu, 6 Jan 2022 22:04:20 +0000 (+0000) Subject: log some details on hostkeys that ssh loads for hostbased authn X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=754adb6a1a31c6e653ddebf27b9ff3df9afd3f57;p=openbsd log some details on hostkeys that ssh loads for hostbased authn ok markus@ --- diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index e9ac9eb28e2..b2cfbe17b87 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.571 2022/01/01 05:55:06 jsg Exp $ */ +/* $OpenBSD: ssh.c,v 1.572 2022/01/06 22:04:20 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -1556,11 +1556,17 @@ main(int ac, char **av) fatal_f("pubkey out of array bounds"); \ check_load(sshkey_load_public(p, &(sensitive_data.keys[o]), NULL), \ p, "pubkey"); \ + if (sensitive_data.keys[o] != NULL) \ + debug2("hostbased key %d: %s key from \"%s\"", o, \ + sshkey_ssh_name(sensitive_data.keys[o]), p); \ } while (0) #define L_CERT(p,o) do { \ if ((o) >= sensitive_data.nkeys) \ fatal_f("cert out of array bounds"); \ check_load(sshkey_load_cert(p, &(sensitive_data.keys[o])), p, "cert"); \ + if (sensitive_data.keys[o] != NULL) \ + debug2("hostbased key %d: %s cert from \"%s\"", o, \ + sshkey_ssh_name(sensitive_data.keys[o]), p); \ } while (0) if (options.hostbased_authentication == 1) {