Skip to content

Commit 9b921dd

Browse files
committed
Hmm
1 parent 0f2548a commit 9b921dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ if [ -z "${INPUT_SSH_KEY}" ];then
3636
echo "HOME: ${HOME}"
3737
export INPUT_PASS
3838
sshpass -h ||:
39-
sshpass -eINPUT_PASS ssh "${INPUT_USER}@${INPUT_HOST}" "pwd" ||:
40-
sshpass -eINPUT_PASS ssh "${INPUT_USER}@${INPUT_HOST}" "ls -lAh ~/.ssh"
39+
/usr/bin/ssh-copy-id -h ||:
40+
sshpass -p "${INPUT_PASS}" ssh -o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}" "pwd" ||:
41+
sshpass -eINPUT_PASS ssh -o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}" "ls -lAh ~/.ssh"
4142
sshpass -eINPUT_PASS -v \
4243
ssh-copy-id -p "${INPUT_PORT}" -i /root/.ssh/id_rsa \
4344
-o BatchMode=yes -o ConnectTimeout=30 "${INPUT_USER}@${INPUT_HOST}"

0 commit comments

Comments
 (0)