mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 20:00:36 +03:00
Merge #133
133: Ssh keyscan fixes r=Mic92 a=Mic92 Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
7b15b0e043
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user