Skip to content

Commit

Permalink
Update ssh-copy.sh
Browse files Browse the repository at this point in the history
Fix SSH_KEY_PASSPHRASE_STORAGE_PATH name and RUNSSH definition
  • Loading branch information
grodriguezl authored Feb 27, 2020
1 parent 3aca64c commit 9697b83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contents/ssh-copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ if [[ "privatekey" == "$authentication" ]] ; then
if [[ -n "${!rd_secure_passphrase}" ]]; then
mkdir -p "/tmp/.ssh-exec"
SSH_KEY_PASSPHRASE_STORAGE_PATH=$(mktemp "/tmp/.ssh-exec/ssh-passfile.$USER@$HOST.XXXXX")
echo "${!rd_secure_passphrase}" > "$SSH_PASS_STORAGE_PATH"
echo "${!rd_secure_passphrase}" > "$SSH_KEY_PASSPHRASE_STORAGE_PATH"

RUNSSH="sshpass -P passphrase -f $SSH_KEY_PASSPHRASE_STORAGE_PATH ssh $SSHOPTS $USER@$HOST $CMD"
RUNSCP="sshpass -P passphrase -f $SSH_KEY_PASSPHRASE_STORAGE_PATH scp $SSHOPTS $FILE $USER@$HOST:$DIR"

trap 'rm "$SSH_KEY_PASSPHRASE_STORAGE_PATH"' EXIT
fi
Expand Down

0 comments on commit 9697b83

Please sign in to comment.