Is there a way to download through telnet

4

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?

Josh Curren

Posted 2009-08-16T19:08:21.330

Reputation: 229

Is rcp available? – Richard Hoskins – 2009-08-16T19:16:55.427

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...) – user1686 – 2009-08-17T10:47:00.980

Answers

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.

Dentrasi

Posted 2009-08-16T19:08:21.330

Reputation: 10 115

I thought that FTP had been disabled but I just tried it again and it worked. – Josh Curren – 2009-08-16T19:31:03.740

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.

yves Baumes

Posted 2009-08-16T19:08:21.330

Reputation: 419

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.

Josip Medved

Posted 2009-08-16T19:08:21.330

Reputation: 8 582

1The 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. – Chris W. Rea – 2009-08-16T23:19:38.837

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.

Paxxi

Posted 2009-08-16T19:08:21.330

Reputation: 6 952

I have been doing this but it is tedious and I then have to paste the text from the email into a new file – Josh Curren – 2009-08-16T19:30:10.170

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.

Hrvoje Prpic

Posted 2009-08-16T19:08:21.330

Reputation: 1