<?xml version="1.0" ?>
<project name="test" default="root">
<target name="telnet">
<telnet server="10.1.1.1">
<read>login:</read>
<write>root</write>
<read>password:</read>
<write>${PASSWORD}</write>
<read>#</read>
<write>ls</write>
<read>#</read>
</telnet>
</target>
</project>
That is the code I have in a build.xml file. When I run ant (version 1.8, in bash) (I have downloaded and copied over the jars for commons-net-2.0 and jakarta-oro-2.0.8 already), this is the output I get:
Buildfile: /home/sagar/build.xml
telnet:
and then it just sits there. When I do a "who" on my server, I can see "System" waiting on login. But there is no progress after this. I can telnet into the server using normal telnet means (putty, bash, etc).
I even tried the full telnet command instead of read/write:
<telnet server="10.1.1.1" userid="root" password="root">
Any help is much appreciated!
Note: JRE 1.5, Ant 1.8, commons-net version 2.0, jakarta version 2.0.8