Skip to content

Commit d4fbe4c

Browse files
committed
print error message to stderr if ssh-keyscan fails
1 parent c5fc538 commit d4fbe4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ for path in "${!disk_encryption_keys[@]}"; do
335335
done
336336

337337
pubkey=$(ssh-keyscan -p "$ssh_port" -t ed25519 "$ssh_host" 2>/dev/null || {
338-
echo "ERROR: failed to retrieve host public key for ${ssh_connection}"
338+
echo "ERROR: failed to retrieve host public key for ${ssh_connection}" >&2
339339
exit 1
340340
})
341341
pubkey=$(echo "$pubkey" | sed -e 's/^[^ ]* //' | base64 -w0)

0 commit comments

Comments
 (0)