title: Gitalb pipeline : SSH to windows and execute script
body: <p>i'm trying to setup a Gitlab pipeline, and one of the steps include running a .bat script on a Windows Server.</p>
  <p>Windows Server has a SSH Daemon installed and configured.</p>
  <p>I've tried the following command from a Unix host</p>
  <pre><code>sshpass -p &lt;pwd&gt; ssh -o StrictHostKeyChecking=no &lt;user&gt;@&lt;ip&gt;
  &quot;C:\Temp\test.bat&quot;
  </code></pre>
  <p>and everything is working fine.</p>
  <p>Gitlab job will be executed from a custom image as this:</p>
  <pre><code>build_and_deploy_on_integrazione:
    stage: build
    tags:
      - maven
    image: &lt;custom_image&gt;
    script: 
      - apt-get update -y
      - apt-get install -y sshpass
      - sshpass -p &lt;pwd&gt; ssh -o StrictHostKeyChecking=no &lt;user&gt;@&lt;ip&gt;
  &quot;C:\Temp\test.bat&quot;
      - echo &quot;Done&quot;
  </code></pre>
  <p>just to be sure i've started a container of the custom image from command line on the same machine that is hosting the Gitlab Runner instance and executed the step of the script, and it's also running fine.</p>
  <p>But when i run the pipeline from Gitlab the bat file is not executed, the only output i see is</p>
  <pre><code>Warning: Permanently added '&lt;ip&gt;' (RSA) to the list of known hosts.
  </code></pre>
  <p>and nothing else.</p>
  <p>i've checked on the SSH Daemon log and the connection is executed correctly, so the &quot;SSH&quot; part of the script seems to be working, but the script is not executed.</p>