473,508 Members | 2,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2360
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3820
by: kumar | last post by:
Hi all, I want to write a telnet server for an embedded linux box using python.The problem is that it doesn't give a shell ( just a limited CLI commands for configuring it . )My requirement is...
6
5213
by: Donnal Walter | last post by:
Several months ago I tried using the telnet module (on Windows XP) to communicate with a proprietary host on our network. This was unsuccessful due to problems with "option negotiation", and I gave...
4
5184
by: praba kar | last post by:
Dear All, Normally we can send mail using telnet in linux. In the following way telnet Ipaddress 25 mail from: raj@rajkumar.com 250 o.k(response of from commandline) rcpt to: test@oops.co.in...
3
1915
by: Shannon Clyde | last post by:
SMTP + relay + auth in an IPSEC tunnel to connect to our primary SMTP mail server (GroupWise) from the Web server looks like it would work fine, but is it the best way? I am aware of CDOSYS and...
3
5766
by: susinthaa | last post by:
Hi , I wrote one program in perl in Solaris to telnet another machine. But When I run the program I got the error message "can't locate Net /Telnet.pm". where can I get this module? Thanks,...
0
1474
by: shineyang | last post by:
Dear all: Who is kind to help me about the following problem. Why cannot log the remote node by using Net::Telent #################################### The following is normal to the process...
3
2035
by: surajsingh | last post by:
Hi, I have a perl script which uses Net::Telnet module to open a telnet session with my unix boxes, and executes lot of commands on those boxes. As this module is implemented, when 'cmd' is...
2
4843
by: kriz4321 | last post by:
Hello all i am using net:telnet module to login to the remote machine and execute some commands and to collect some logs corresponding to the command given. After loging into the machine I do...
6
5490
by: sherrygomindes | last post by:
Hi I have written a perl script using the Telnet module. I need to remotely login in from one windows XP machine to another XP machine. But i get errors which i can't figure out the reason....
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
435
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.