[openssh-commits] [openssh] branch master updated: upstream: don't print an error message when trying to load a host

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Jun 29 17:37:26 AEST 2026


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 84365594f upstream: don't print an error message when trying to load a host
84365594f is described below

commit 84365594f44423b69392f295f82e9cbcdd8c2640
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Jun 29 07:36:37 2026 +0000

    upstream: don't print an error message when trying to load a host
    
    private key when PKCS#11 keys are in use, as these don't need the private
    half on the filesystem. GHPR664 from Ingo Franzki
    
    OpenBSD-Commit-ID: c93352e218cb1b74af04e8dc3a42eddec1f312c0
---
 sshd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sshd.c b/sshd.c
index 1532ee69b..7d1466d97 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.627 2026/06/14 03:59:34 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.628 2026/06/29 07:36:37 djm Exp $ */
 /*
  * Copyright (c) 2000, 2001, 2002 Markus Friedl.  All rights reserved.
  * Copyright (c) 2002 Niels Provos.  All rights reserved.
@@ -1591,7 +1591,8 @@ main(int ac, char **av)
 		if (options.host_key_files[i] == NULL)
 			continue;
 		if ((r = sshkey_load_private(options.host_key_files[i], "",
-		    &key, NULL)) != 0 && r != SSH_ERR_SYSTEM_ERROR)
+		    &key, NULL)) != 0 &&
+		    r != SSH_ERR_SYSTEM_ERROR && !have_agent)
 			do_log2_r(r, ll, "Unable to load host key \"%s\"",
 			    options.host_key_files[i]);
 		if (sshkey_is_sk(key) &&

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list