Merge pull request #322282 from tylerjl/tylerjl/print-host-key-soft-fail

nixos/ec2-data: skip unrecognized keys in print-host-keys
This commit is contained in:
Masum Reza 2024-07-31 10:59:10 +05:30 committed by GitHub
commit 184957277e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -79,7 +79,7 @@ with lib;
# ec2-get-console-output.
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" > /dev/console
for i in /etc/ssh/ssh_host_*_key.pub; do
${config.programs.ssh.package}/bin/ssh-keygen -l -f $i > /dev/console
${config.programs.ssh.package}/bin/ssh-keygen -l -f $i || true > /dev/console
done
echo "-----END SSH HOST KEY FINGERPRINTS-----" > /dev/console
'';