Following ant build script to help you to execute command in remote server.