mirror of
https://github.com/Burnett01/rsync-deployments.git
synced 2025-12-19 11:12:18 +01:00
fix: filter out comments from ssh-keyscan output for strict host key checking
This commit is contained in:
parent
f85e1bae12
commit
1b2e963616
1 changed files with 1 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ STRICT_HOSTKEYS_CHECKING="-o StrictHostKeyChecking=no"
|
|||
if [ "${INPUT_STRICT_HOSTKEYS_CHECKING:-false}" = "true" ]; then
|
||||
STRICT_HOSTKEYS_CHECKING="-o StrictHostKeyChecking=yes"
|
||||
|
||||
key="$(ssh-keyscan -p "$INPUT_REMOTE_PORT" "$INPUT_REMOTE_HOST" 2>/dev/null)" || key=""
|
||||
key="$(ssh-keyscan -p "$INPUT_REMOTE_PORT" "$INPUT_REMOTE_HOST" 2>/dev/null)" | sed '/^#/d' || key=""
|
||||
if [ -n "$key" ]; then
|
||||
# fingerprint verification
|
||||
echo "$key" | ssh-keygen -lf -
|
||||
|
|
|
|||
Loading…
Reference in a new issue