trying to copy files from another machine to the local machine using telnet,..how?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Don't know about doing it with telnet because I've never used it. You really shouldn't either... It sends everything, including your login/password, across the network as plain text. Not even a thought of security.
Instead, you should use ssh (Secure SHell) to remotely login. When you have that running, you can then use scp (Secure CoPy) to transfer files...
actually scp only supports local-to-remote or remote-to-local transfers... if you have to go remote->remote with scp, ssh into one box (if scp is listening, ssh must be as well) and scp from that box to the other. IE:
It's easy, once you connect (with either ssh or telnet), you open a port in any machine with nc, then you use nc on the other to transfer data. The choice of machine depends on your configuration, firewalls, etc.
For example, to open a port in any machine and redirect output to a file, you'd do:
If you really have no other option than using telnet, you can still download files through it.
If they are plain text files, run the "script" command before launching the telnet command, on the remote host "cat" your text file then logout.
After exiting the script command, you'll have a file named "typescript" that will contain all your telnet transaction, just edit this file by removing the unnecessary header, trailers and the carriage returns at each end of line and you are set.
If you want to to transfer a binary file, use the same technique, but instead of using cat, use:
uuencode -m filename < filename
On the local host, use uudecode to process the typescript, it will extract the binary file.