470,810 Members | 863 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,810 developers. It's quick & easy.

telnetting without a telnet module

Hello everyone,
i was wondering if anybody knew how to "telnet" to another machine
to get a file, but the machine that i am using and the machine i am
targetting both do not have the telnet module. Thanks
Howard
Jul 19 '05 #1
2 2320
Use HTTP Post
"Howard" <hy****@us.ibm.com> wrote in message
news:d0**************************@posting.google.c om...
Hello everyone,
i was wondering if anybody knew how to "telnet" to another machine
to get a file, but the machine that i am using and the machine i am
targetting both do not have the telnet module. Thanks
Howard

Jul 19 '05 #2
Why don't you run Perl from ANT and then have ANT handle the ftp task
?

ANT will allow you to telnet to a remote host and to execute an
ftp from there to yet another remote host. So you can get around
a firewall.

Something like ...

<project name="Manifest" basedir="." default="Doc" >

<property file="${JobName}/job.properties"/>
<property name="JobOrderOutput" value="${JobOrderRoot}/job_output"/>
<property name="Perl" value="/usr/local/bin/perl"/>
<property name="JobOrderPerl" value="${JobOrderRoot}/perl"/>
<property name="JobOrderPerlLib" value="${JobOrderRoot}/lib"/>

<target name="RunPerl">
<echo message="exc : ${Perl} -I${JobOrderPerlLib}
${JobOrderPerl}/${JobScript} ${JobOrderOutput} ${JobOrderArgs}"/>
<exec executable="${Perl}">
<arg line="-I${JobOrderPerlLib}"/>
<arg line="${JobOrderPerl}/${JobScript}"/>
<arg line="${JobOrderOutput}"/>
</exec>
</target>
<target name="FtpToStaging">
<echo message="ftp : ${FTPServer} as ${FTPUserID}/${FTPPassword}"/>
<echo message="lcd : ${JobOrderOutput}"/>
<echo message="put : ${JobOrderOutputFileName}"/>
<ftp server="${FTPServer}"
remotedir="${FTPRemoteDir}"
userid="${FTPUserID}"
password="${FTPPassword}"
<fileset dir="${JobOrderOutput}">
<include name="${JobOrderOutputFileName}"/>
</fileset>
</ftp>
</target>
<target name="StagingPushToRemote">
<telnet userid="${TNPStageUserID}"
password="${TNPStagePassword}"
server="${TNPStageServer}"

<read string="${TNPStagePrompt}"/>
<write string="ftp ${TNPExternalHost}"/>
<read>):</read>
<write string="${TNPExternalHostUserID}"/>
<read>:</read>
<write string="${TNPExternalHostPassword}"/>
<read>ftp></read>
<write string="binary"/>
<read>ftp></read>
<write string="${TNPExecuteLCD}"/>
<read>ftp></read>
<write string="${TNPExecuteCD}"/>
<read>ftp></read>
<write string="${TNPExecutePush}"/>
<read>ftp></read>
<write>quit</write>
</telnet>
</target>

<target name="MainTarget" >
<antcall target="RunPerl"/>
<antcall target="FtpToStaging"/>
<antcall target="StagingPushToRemote"/>
</target>

</project>
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by kumar | last post: by
6 posts views Thread by Donnal Walter | last post: by
4 posts views Thread by praba kar | last post: by
3 posts views Thread by Shannon Clyde | last post: by
2 posts views Thread by kriz4321 | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.