6

I am transfering colleges and I have a lot of files from the first college that I would like to keep. The files are are on a Sun server which I can only access using telnet. Is there a way to download the files from the server using telnet?

2
  • Is rcp available? Aug 16, 2009 at 19:16
  • Are you sure the server doesn't have ssh running? If it does, there are scp and sftp commands. (If it does not, then it has one stupid sysadmin...) Aug 17, 2009 at 10:47

5 Answers 5

3

The easiest way is if you can run binaries on the machine, so set up a simple ftp server or something. If you can't do that, perhaps a combination of tar/gz to get one file, and then you can netcat it across? As a last restore, uuencode and cat could be used.

1
  • I thought that FTP had been disabled but I just tried it again and it worked. Aug 16, 2009 at 19:31
3

Using netcat ? If you have numerous files, I suggest to tarball them.

On the server side (using telnet port):

$netcat -l -p 23 < my_file.tar

On the client side:

$netcat machine_name 23 > my_file.tar

Netcat tool may exist named as "netcat" or "nc", check that out on your server machine.

1

Only way I see is to tar everything and convert it to base64. Once you are done with that, just "cat" it on remote side. If your telnet client (e.g. putty) has log, just log everything in file.

Once received, just unbase64 and untar it. That should give you your data.

But do notice that this procedure is pain-in-the-ass and it takes a while for any significant amount of data.

1
  • 1
    The traditional UNIX utilities uuencode and uudecode are also acceptable and more likely to be available on any UNIX system. Base64 is preferable, though, since it's less overhead. Aug 16, 2009 at 23:19
1

It all depends on what you're allowed to do on the machine. One simple solution is to send all files by mail to yourself if you have access to a mail client.

1
  • I have been doing this but it is tedious and I then have to paste the text from the email into a new file Aug 16, 2009 at 19:30
0

It's actually very easy as long as you can approach the "server" (the machine that is receiving the file). In the server terminal type:

nc -l 1234 > my_file.tar

...where 1234 is a random port and my_file_tar is the name of the receiving file. Sometimes you will have to create an empty file with the same name on the server side before you start the command.

On the client side type

nc server-ip-address 1234 < my_file.tar

...where 1234 is the exact port as above and my_file.tar is the file which you are uploading.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .