title: Transfer files from local machine(i.e) windows to remote machine(Ubuntu) using ANT script through scp
body: <p>I wrote this simple script to transfer files from my machine to remote machine. Here I included the jars of ant.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project name="File_Transfer_using_ANT" default="."&gt;
     &lt;property name="lib" location="lib" /&gt;
     &lt;path id="project.classpath"&gt;
        &lt;fileset dir="${lib}"&gt;
           &lt;include name="*.jar" /&gt;
        &lt;/fileset&gt;
     &lt;/path&gt;
     &lt;target name="copy"&gt;
        &lt;classpath refid="project.classpath" /&gt;
        &lt;scp todir="username:password@ip:path/"&gt;
           &lt;fileset dir="source path"&gt;
              &lt;include name="**/*.txt" /&gt;
           &lt;/fileset&gt;
        &lt;/scp&gt;
     &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>java.lang.NoSuchMethodError: com.jcraft.jsch.Session.setConfig(Ljava/lang/String;Ljava/lang/String;)V<br>
    at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase.openSession(SSHBase.java:221)</p>
  </blockquote>
  
  <p>I also Added jar file required into ant lib path. I don't know where I did wrong.</p>