Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection is closed by foreign host given by Ant SCP task

 
sasank ch
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using scp task in my ant build file and target as follows:

<target name="copyFileToRemote">
<scp file="sample.dll" todir="user@host:/shared" port="21" trust="true" password="password" verbose="true"/>
</target>


When i call the "copyFileToRemote" target ,It is giving following error:

[scp] Connecting to host:21
java.lang.Exception: com.jcraft.jsch.JSchException: connection is closed by foreign host


I have tried both ports 21 and 22 also. The remote machine having ftp server and it up and running with read/write permissions.
Could you please guide me to resolve this problem.

Regards,
Sasank
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SCP != FTP, it needs to have scp enabled.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic