Skip to content

Commit 29012e9

Browse files
committed
Hmm
1 parent 11b1d15 commit 29012e9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ if [ -z "${INPUT_SSH_KEY}" ];then
3939
export INPUT_PASS
4040
sshpass -h ||:
4141
/usr/bin/ssh-copy-id -h ||:
42-
sshpass -p "${INPUT_PASS}" ssh -o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}" "pwd" ||:
43-
sshpass -eINPUT_PASS ssh -o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}" "ls -lAh ~/.ssh"
42+
sshpass -p "${INPUT_PASS}" ssh -o BatchMode=yes -o ConnectTimeout=30 -p "${INPUT_PORT}" "${INPUT_USER}@${INPUT_HOST}" "pwd" ||:
43+
sshpass -eINPUT_PASS ssh -o BatchMode=yes -o ConnectTimeout=30 -p "${INPUT_PORT}" "${INPUT_USER}@${INPUT_HOST}" "ls -lAh ~/.ssh"
4444
sshpass -eINPUT_PASS -v \
45-
ssh-copy-id -p "${INPUT_PORT}" -i /root/.ssh/id_rsa \
46-
-o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}"
45+
ssh-copy-id -i /root/.ssh/id_rsa -o BatchMode=yes -o ConnectTimeout=30 \
46+
-p "${INPUT_PORT}" "${INPUT_USER}@${INPUT_HOST}"
4747
else
4848
echo "::group::Adding SSH Key to SSH Agent"
4949
echo "${INPUT_SSH_KEY}" > /root/.ssh/id_rsa

0 commit comments

Comments
 (0)