feat: Make usage of legacy rsa hostkeys conditional
The usage of RSA host keys introduced with c7baefdc23
was adjusted to make it conditional/configurable and to keep
backward compatibility
This commit is contained in:
parent
580c98fc2e
commit
9603fc8186
|
@ -13,8 +13,11 @@ echo "$INPUT_REMOTE_KEY" | SSH_PASS="$INPUT_REMOTE_KEY_PASS" agent-add
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Variables.
|
# Variables.
|
||||||
|
LEGACY_RSA_HOSTKEYS="-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
|
||||||
|
LEGACY_RSA_HOSTKEYS=$([ "$INPUT_LEGACY_ALLOW_RSA_HOSTKEYS" = "true" ] && echo "$LEGACY_RSA_HOSTKEYS" || echo "")
|
||||||
|
|
||||||
SWITCHES="$INPUT_SWITCHES"
|
SWITCHES="$INPUT_SWITCHES"
|
||||||
RSH="ssh -o StrictHostKeyChecking=no -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa -p $INPUT_REMOTE_PORT $INPUT_RSH"
|
RSH="ssh -o StrictHostKeyChecking=no $LEGACY_RSA_HOSTKEYS -p $INPUT_REMOTE_PORT $INPUT_RSH"
|
||||||
LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH"
|
LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH"
|
||||||
DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST"
|
DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue