From 17234442892d77e0fa601b21a945f55e829ef5a5 Mon Sep 17 00:00:00 2001 From: Sebastian Huebner Date: Tue, 1 Oct 2019 14:43:24 +0200 Subject: [PATCH] removed not working ssh key type detection --- upload.sh | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/upload.sh b/upload.sh index 4aa03db..35ead58 100755 --- a/upload.sh +++ b/upload.sh @@ -56,7 +56,10 @@ if [[ -n "$PLUGIN_DELETE" && "$PLUGIN_DELETE" == "true" ]]; then expr="$expr --del" fi -expr="$expr -e 'ssh -p %s -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o StrictHostKeyChecking=no'" +home="/root" +keyfile="$home/.ssh/id" + +expr="$expr -e 'ssh -i $keyfile -p %s -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o StrictHostKeyChecking=no'" # Include IFS=','; read -ra INCLUDE <<< "$PLUGIN_INCLUDE" @@ -79,24 +82,11 @@ done expr="$expr $SOURCE" # Prepare SSH -home="/root" - mkdir -p "$home/.ssh" printf "StrictHostKeyChecking no\n" > "$home/.ssh/config" chmod 0700 "$home/.ssh/config" -keyfile="$home/.ssh/id_rsa" -echo "$SSH_KEY" | grep -q "ssh-ed25519" -if [ $? -eq 0 ]; then - printf "Using ed25519 based key\n" - keyfile="$home/.ssh/id_ed25519" -fi -echo "$SSH_KEY" | grep -q "ecdsa-" -if [ $? -eq 0 ]; then - printf "Using ecdsa based key\n" - keyfile="$home/.ssh/id_ecdsa" -fi echo "$SSH_KEY" > $keyfile chmod 0600 $keyfile