I got the error
Turns out that the default deployment of Ant (1.7) did not contain this jar on Mac OS-x 10.5. So I had to do two things
Deploy.ant.xml:57: Problem: failed to create task or type scp
Cause: the class org.apache.tools.ant.taskdefs.optional.ssh.Scp was not found.
This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
-a directory added on the command line with the -lib argument
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
This is not a bug; it is a configuration problem
- Download the binary distribution of Ant 1.7, unpack the jar and copy ant-jsch.jar to /usr/share/ant/lib
- Download the implementation of the SSH java code from JCraft and copy it to /usr/share/ant/lib
2. I still can't SCP to EC2
So I know I can scp -i to this EC2 host, but the following Ant task fails
/Volumes/Develop/Develop/Projects/HarpoonDeployMK9a/Deploy.ant.xml:57: neither password nor passphrase for user root has been given. Can't authenticate.
Turns out that you need the following in the SCP task for it to work with EC2