title: How to run a command over SSH automatically on Windows
body: <p>I have two Windows boxes. One is Jenkins build server. Second one is deployment box.</p>
  
  <p>I have installed SSH and created a user on the deployment Windows box. I can ssh to it from my Ubuntu workstation and run commands I need to run.</p>
  
  <p>But I need to do this automatically from Jenkins. How to do it? Basically I need to make this automatic:</p>
  
  <pre><code>ssh richard@myserver
  ... enter password ...
  cd C:/puppet &amp;&amp; git pull
  "/cygdrive/c/Program Files (x86)/Puppet Labs/Puppet/bin/puppet.bat" apply C:/puppet/manifests/site.pp
  </code></pre>
  
  <p>That's it. Is there some way to do this from a batch file and just execute the *.bat file from Jenkins?</p>