title: Maven site:deploy error: "Error uploading site: Error performing commands for file transfer: Exit code: 0 - The syntax of the command is incorrect."
body: <p>I'm attempting to use the site:deploy feature of Maven to deploy a project site to a server on my local network. The server is running Windows Server 2012.</p>
  
  <p>I have successfully set up an Apache Archiva Maven repository on it, and I am able to deploy my projects and pull dependencies to/from it just fine.</p>
  
  <p>When I run <code>mvn site:deploy</code>, I get this:</p>
  
  <pre><code>[INFO] --- maven-site-plugin:3.6:deploy (default-deploy) @ piserver ---
  [INFO] Pushing C:\Users\Eric\Development\Projects\Java\PiServerJava\target\site
  [INFO]    &gt;&gt;&gt; to scp://192.168.1.215/inetpub/wwwroot/software/projects/piserver/./
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 3.631 s
  [INFO] Finished at: 2016-11-30T10:11:55-07:00
  [INFO] Final Memory: 22M/219M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-
  plugin:3.6:deploy (default-deploy) on project piserver: Error uploading
  site: Error performing commands for file transfer: Exit code: 0 - The syntax
  of the command is incorrect.
  </code></pre>
  
  <p>My POM <code>&lt;distributionManagement&gt;</code> section looks like this:</p>
  
  <pre><code>&lt;distributionManagement&gt;
      &lt;site&gt;
          &lt;id&gt;etv-site&lt;/id&gt;
          &lt;url&gt;scp://192.168.1.215/inetpub/wwwroot/software/projects/piserver/&lt;/url&gt;
      &lt;/site&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>and my settings.xml <code>&lt;server&gt;</code> section looks like this:</p>
  
  <pre><code>&lt;server&gt;
      &lt;id&gt;etv-site&lt;/id&gt;
      &lt;username&gt;********&lt;/username&gt;
      &lt;password&gt;********&lt;/password&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>For my wagon provider, I use</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
              &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt;
              &lt;version&gt;2.10&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>No matter what I try for a url in <code>&lt;distributionManagement&gt;</code>, I get the same error. I've tried</p>
  
  <ul>
  <li><code>scp://192.168.1.215/inetpub/wwwroot/software/projects/piserver/</code></li>
  <li><code>scp://192.168.1.215/C:/inetpub/wwwroot/software/projects/piserver/</code></li>
  <li><code>scp://192.168.1.215/software/projects/piserver/</code></li>
  </ul>
  
  <p>among others.</p>
  
  <p>Other things I've tried:</p>
  
  <ul>
  <li>URL: <code>scp:http://192.168.1.215/inetpub/wwwroot/software/projects/piserver/</code>; Error: <code>Cannot connect. Reason: java.net.UnknownHostException</code>.</li>
  <li>URL: <code>sftp://192.168.1.215/inetpub/wwwroot/software/projects/piserver/</code>; Error: <code>Error uploading site: Exit code: 0 - 'chmod' is not recognized as an internal or external command,
  [ERROR] operable program or batch file.</code></li>
  </ul>
  
  <p>For reference, my Archiva repository URLs look like this:</p>
  
  <pre><code>&lt;repository&gt;
      &lt;id&gt;etv-internal&lt;/id&gt;
      &lt;url&gt;http://192.168.1.215:8080/repository/internal&lt;/url&gt;
  &lt;/repository&gt;
  &lt;snapshotRepository&gt;
      &lt;id&gt;etv-snapshots&lt;/id&gt;
      &lt;url&gt;http://192.168.1.215:8080/repository/snapshots&lt;/url&gt;
  &lt;/snapshotRepository&gt;
  </code></pre>
  
  <hr>
  
  <h2>UPDATE:</h2>
  
  <p>The <code>sftp://</code> solution successfully deploys my site, but I still get the chmod error. I would still like to use scp instead of sftp, though.</p>