https://bugs.koozali.org/show_bug.cgi?id=12081
John Crisp <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Flags| |help_verify+
--- Comment #5 from John Crisp <[email protected]> ---
Sorry I've been out with Covid - still not great :-(
OK, this is tricky.
The 'simple' answer is to probably add this where required.
-o UserKnownHostsFile=/root/.ssh/knownhosts-$jobname
The known_hosts file is generated when we use send-keys so if we refer to it we
do not need to hit they yes/no accept.
I think there are a couple of places this needs adjusting.
@@ -1387,7 +1383,7 @@
#### ligne suivante: rajouté $jobname
remoteCopy( $jobname, "/sbin/e-smith/affa-rpmlist.sh",
"/sbin/e-smith/affa-rpmlist.sh" );
- @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname", $sshQuiet,
$job{'remoteHostName'}, "'/sbin/e-smith/affa-rpmlist.sh>$rpmlist'"
+ @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname", '-o',
"UserKnownHostsFile=/root/.ssh/knownhosts-$jobname", $sshQuiet,
$job{'remoteHostName'}, "'/sbin/e-smith/affa-rpmlist.sh>$rpmlist'"
);
}
not ExecCmd( @cmd, 0 ) or affaErrorExit("writing list of installed RPMs
failed.");
@@ -1696,7 +1692,7 @@
close(WDS);
close(WD);
chmod( 0700, "/tmp/$$.$WDName" );
- my @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname",
$job{'remoteHostName'}, "/bin/rm", "-f", "/etc/cron.hourly/$WDName-reminder"
+ my @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname", '-o',
"UserKnownHostsFile=/root/.ssh/knownhosts-$jobname", $job{'remoteHostName'},
"/bin/rm", "-f", "/etc/cron.hourly/$WDName-reminder"
);
not ExecCmd( @cmd, 0 ) or affaErrorExit("Couldn't delete
/etc/cron.hourly/$WDName-reminder on remote host.");
##### ligne suivante: ajouté $jobname
@@ -1729,7 +1725,7 @@
#### ligne suivante: ajouté $jobname
remoteCopy( $jobname, "/usr/lib/affa/$WDName", "/tmp/" );
- my @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname", $sshQuiet,
$job{'remoteHostName'}, "/tmp/$WDName"
+ my @cmd = ( '/usr/bin/ssh', '-p', $job{'sshPort'}, '-i',
'/root/.ssh/id_rsa_affa', '-o', "HostKeyAlias=$jobname", '-o',
"UserKnownHostsFile=/root/.ssh/knownhosts-$jobname", $sshQuiet,
$job{'remoteHostName'}, "/tmp/$WDName"
);
not ExecCmd( @cmd, 0 ) or affaErrorExit("Couldn't run
/usr/lib/affa/$WDName on remote host.");
}
Can you please see what happens with this in version 3.3.1-8 as I may have
missed something, or there may be wider implications I can't see through my
brain fog.
* Thu Jun 30 2022 John Crisp <[email protected]> 3.3.1-8
- Fix KnownHosts error [SME: 12081]
- Thanks to 'gieres' for finding this
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/