From 9089d3700b669b0e0564e64ca9a847aa7700ef4b Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 7 Sep 2026 02:05:20 +0200 Subject: [PATCH] Find ssh-keysign where SUSE 16 puts it The permissions.local rule named /usr/lib/ssh, so keysign kept mode 0755 and hostbased auth failed with 'could not open any host key'. --- imgutil/imgutil | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/imgutil/imgutil b/imgutil/imgutil index 7f0e0506..e9bd1f5c 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -692,13 +692,17 @@ class SuseHandler(OsHandler): mkdirp(os.path.dirname(sshdwant)) if not os.path.lexists(sshdwant): os.symlink('/usr/lib/systemd/system/sshd.service', sshdwant) + # 16 moved ssh-keysign to libexec + keysign = 'usr/libexec/ssh/ssh-keysign' + if not os.path.exists(os.path.join(self.targpath, keysign)): + keysign = 'usr/lib/ssh/ssh-keysign' with open(os.path.join(self.targpath, 'etc/permissions.local'), 'a') as permout: permout.write( - '/usr/lib/ssh/ssh-keysign root:ssh_keys 2711\n' + '/{0} root:ssh_keys 2711\n' '/etc/ssh/ssh_host_dsa_key root:ssh_keys 640\n' '/etc/ssh/ssh_host_ecdsa_key root:ssh_keys 640\n' '/etc/ssh/ssh_host_ed25519_key root:ssh_keys 640\n' - '/etc/ssh/ssh_host_rsa_key root:ssh_keys 640\n' + '/etc/ssh/ssh_host_rsa_key root:ssh_keys 640\n'.format(keysign) ) args.cmd = ['groupadd', 'ssh_keys'] run_constrainedx(fancy_chroot, (args,