You are not logged in.

#1 2012-09-01 04:49:10

kdar
Member
From: Alabama!!!
Registered: 2009-06-27
Posts: 352

netcat question: asking server to send a file from client pc

I have used netcat fine when I wanted to send something to a server.. I simply open a netcat port on server side and then do following command on client side:
nc xeon-server 1234 < sendthisfile.tar

However... what do I do if I want to retrieve some file from a server without touching server pc..I would like to do it just by using a single command from client pc.. (for example how one would use scp... )..

Last edited by kdar (2012-09-01 04:50:41)

Offline

#2 2012-09-18 18:32:36

Tes--
Member
Registered: 2009-11-13
Posts: 42

Re: netcat question: asking server to send a file from client pc

Simply use scp? Or ssh to start netcat? Or setup an ftp server?

Offline

#3 2012-10-14 18:34:32

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,277

Re: netcat question: asking server to send a file from client pc

You could do something like

echo -e "GET http://www.jfranken.de/homepages/johannes/vortraege/netcat/README.txt HTTP/1.0\r\n\r\n" | nc -w 5 jfranken.de 80 |less

but

curl http://www.jfranken.de/homepages/johannes/vortraege/netcat/README.txt |less

is less typing.

edit: added pipe to less, it is better to read then

Last edited by Strike0 (2012-10-14 19:00:06)

Offline

Board footer

Powered by FluxBB