Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
This commit is contained in:
JackWhh
2024-07-18 09:30:05 +00:00
committed by Gitee
parent 046196ef61
commit 16826b94db
2 changed files with 7 additions and 2 deletions

View File

@@ -62,6 +62,8 @@ echo 'SFTP Start'
printf "%s" "put -r $5 $6" >$TEMP_SFTP_FILE
#-o StrictHostKeyChecking=no avoid Host key verification failed.
sftp -b $TEMP_SFTP_FILE -P $3 $8 -o StrictHostKeyChecking=no -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2
if [ -z != ${11} ]; then
ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 $11
fi
echo 'Deploy Success'
exit 0