concept SSH in category ant

appears as: SSH
Ant in Action

This is an excerpt from Manning's book Ant in Action.

For redistributing files, SSH should be the protocol of choice, and under Ant, <scp> is the task to use. It’s secure and reliable. There’s one more feature that SSH gives us—remote code execution—which Ant offers through the <sshexec> task.

7.4. Secure distribution with SSH and SCP

The next distribution activity is to upload our application using SSH. This protocol encrypts all communications, authenticates the server to the client via a public key, and the client to the server via a public/private key pair or via a password. It’s a secure way to connect to remote servers or upload applications, and is widely used.

Once SSH is working, disconnect and use SCP to copy something over.

scp -i k2-identity k2-identity.pub k2:.

A successful copy verifies that SCP is working. Only after the command line tools are working should you turn to the Ant tasks that use SSH.