Retry the scp command until it exits successfully