Transfer to & from remote machine using telnet 
Author Message
 Transfer to & from remote machine using telnet

I have need to tansfer file(s) to & froma remote machine using through telnet
(not ftp or any other means). Is this possible? If yes, is there an example
perl script for the same.


Mon, 12 Apr 2004 05:42:22 GMT  
 Transfer to & from remote machine using telnet


Quote:
> I have need to tansfer file(s) to & froma remote machine using through
telnet
> (not ftp or any other means). Is this possible? If yes, is there an
example
> perl script for the same.

Telnet is not a file transfer protocol. The simple answer is no.

However, telnet is an established tcp/ip connection between two machines, so
theoretically with the right client pumping stuff out to STDOUT on the
telnet server, and the right client capturing that output as the telnet
client, and some exhausting error checking, you could get a carefully
constructed sender+receiver pair to transfer a file over telnet.

On the other hand, it might be easier to write your own protocol.  You
haven't elaborated much on your weird limitation.



Mon, 12 Apr 2004 06:02:58 GMT  
 Transfer to & from remote machine using telnet

Quote:



>> I have need to tansfer file(s) to & froma remote machine using through
>telnet
>> (not ftp or any other means). Is this possible? If yes, is there an
>example
>> perl script for the same.

>Telnet is not a file transfer protocol. The simple answer is no.

>However, telnet is an established tcp/ip connection between two machines, so
>theoretically with the right client pumping stuff out to STDOUT on the
>telnet server, and the right client capturing that output as the telnet
>client, and some exhausting error checking,

Aw, it's not that hard.  You don't need error checking, since error
checking should be happening at the TCP stream level.

Last time I found myself in this situation, I was using two Unix
machines, so I simply did this:

    1.  Type "uuencode myfile myfile > myfile.uu" on the remote machine.
    2.  Turn on the "Log to File" option in xterm.
    3.  Type "cat myfile.uu".
    4.  Turn off the "Log to File" option in xterm.
    5.  Edit the logfile, delete extra stuff at beginning/end,
        and type "uudecode logfile".

Probably the easiest way to pull this off these days would be to use
something like Z-Modem or Kermit, which we used to use on modems back
before PPP existed (and when SLIP was not yet popular).

In fact, C-Kermit is still being actively maintained.  See
http://www.columbia.edu/kermit/ .

None of this really helps with a Perl solution, but since Kermit should
do the job and since it has already been implemented (and since
searches at CPAN don't turn up anything kermit-related), that's the
tool I'd use.

And if I chose to implement something myself in Perl, I'd try to
implement a minimal version of Kermit, since they've been working the
bugs out of it for 17 years now...

  - Logan
--
"In order to be prepared to hope in what does not deceive,
 we must first lose hope in everything that deceives."

                                          Georges Bernanos



Mon, 12 Apr 2004 07:55:59 GMT  
 Transfer to & from remote machine using telnet

Quote:



>>> I have need to tansfer file(s) to & froma remote machine using through
>>> telnet (not ftp or any other means). Is this possible? If yes, is
>>> there an example perl script for the same.

>>Telnet is not a file transfer protocol. The simple answer is no.

[...]
> Aw, it's not that hard.  You don't need error checking, since error
> checking should be happening at the TCP stream level.

> Last time I found myself in this situation, I was using two Unix
> machines, so I simply did this:

>     1.  Type "uuencode myfile myfile > myfile.uu" on the remote machine.
>     2.  Turn on the "Log to File" option in xterm.
>     3.  Type "cat myfile.uu".
>     4.  Turn off the "Log to File" option in xterm.
>     5.  Edit the logfile, delete extra stuff at beginning/end,
>    and type "uudecode logfile".

Pretty.  But you don't need to use xterm, you can just do
"telnet othercomputer | tee logfile.txt", and you probably don't need
to delete the {*filter*}(as long as you don't have a prompt beginning "begin"
or anything weird like that)

--
David



Mon, 12 Apr 2004 13:58:14 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Transfer to & from remote machine using telnet

2. Using Win32::NetAdmin on remote machine

3. using Find on a remote machine

4. Running Perl script on remote machine and returning result to script on current machine

5. Using the TELNET module with Bay Remote Access Concentrator

6. Using PERL to do a remote TELNET

7. Telnet module and perl script to telnet to remote, perform commands and log output

8. Easy way to transfer file from one machine to another

9. Seeking Perl program to transfer files between machines (sort of like TFTP)

10. remote file transfer and edit

11. transfer of remote files.

12. Failed Net::FTP transfers from browser, not telnet

 

 
Powered by phpBB® Forum Software