I am running rsync -Parz myfile remoteuser@remotehost:targetpath/
and
ssh -o StrictHostKeyChecking=no remoteuser@remotehost << HERE
somecommands here to start service etc
HERE
using gitlab-ci pipeline and executing above commands through .gitlab-ci.yml and it randomly hangs but most of the time it works.
My objective is to copy some files and execute some commands from gitlab-runner on remote host.