Skip to content

Commit e61c900

Browse files
committed
Hmm
1 parent c0c79cf commit e61c900

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,10 @@ if [ -z "${INPUT_SSH_KEY}" ];then
3333
ssh-keygen -q -f /root/.ssh/id_rsa -N "" -C "docker-stack-deploy-action"
3434
eval "$(ssh-agent -s)"
3535
ssh-add /root/.ssh/id_rsa
36-
sshpass --help ||:
37-
sshpass -p "${INPUT_PASS}" ssh "${INPUT_USER}@${INPUT_HOST}" "pwd"
38-
sshpass -p "${INPUT_PASS}" ssh "${INPUT_USER}@${INPUT_HOST}" "echo ~/.ssh"
39-
sshpass -p "${INPUT_PASS}" ssh "${INPUT_USER}@${INPUT_HOST}" "stat ~/.ssh"
36+
sshpass -h ||:
37+
sshpass -e INPUT_PASS ssh "${INPUT_USER}@${INPUT_HOST}" "pwd" ||:
4038
sshpass -p "${INPUT_PASS}" ssh "${INPUT_USER}@${INPUT_HOST}" "ls -lAh ~/.ssh"
41-
sshpass -p "${INPUT_PASS}" \
39+
sshpass -v -p "${INPUT_PASS}" \
4240
ssh-copy-id -p "${INPUT_PORT}" -i /root/.ssh/id_rsa \
4341
"${INPUT_USER}@${INPUT_HOST}"
4442
else

0 commit comments

Comments
 (0)