133: Ssh keyscan fixes r=Mic92 a=Mic92



Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
bors[bot] 2023-06-07 05:37:04 +00:00 committed by GitHub
commit 7b15b0e043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -224,7 +224,7 @@ if [[ -n ${ssh_private_key_file-} ]]; then
fi
ssh_settings=$(ssh -G "${ssh_connection}")
ssh_host=$(echo "$ssh_settings" | awk '/^host / { print $2 }')
ssh_host=$(echo "$ssh_settings" | awk '/^hostname / { print $2 }')
ssh_port=$(echo "$ssh_settings" | awk '/^port / { print $2 }')
step Uploading install SSH keys
@ -335,7 +335,7 @@ for path in "${!disk_encryption_keys[@]}"; do
done
pubkey=$(ssh-keyscan -p "$ssh_port" -t ed25519 "$ssh_host" 2>/dev/null || {
echo "ERROR: failed to retrieve host public key for ${ssh_connection}"
echo "ERROR: failed to retrieve host public key for ${ssh_connection}" >&2
exit 1
})
pubkey=$(echo "$pubkey" | sed -e 's/^[^ ]* //' | base64 -w0)