Hi All,

I am using scp command. it is working fine for some time
but some times it is fails to execute.

I hava included jsh.jar in lib of ant and set the paths correctly.

com.jcraft.jsch.JSchException: Session.connect: java.net.SocketException: Connection reset by peer: socket write error
at com.jcraft.jsch.Session.connect(Session.java:495)
at com.jcraft.jsch.Session.connect(Session.java:150)
at org.apache.tools.ant.taskdefs.optional.ssh.SSHBase .openSession(SSHBase.java:212)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.upl oad(Scp.java:266)
at org.apache.tools.ant.taskdefs.optional.ssh.Scp.exe cute(Scp.java:201)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:28
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:34
at org.apache.tools.ant.Target.execute(Target.java:35 7)
at org.apache.tools.ant.Target.performTasks(Target.ja va:385)
at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project .java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Projec t.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:75
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher. java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher .java:10)

what could be issue?

Thanks in advance...

Regards,
Rajesh Gottapu