cancel
Showing results for 
Search instead for 
Did you mean: 

Q about scp

Bouda16
Occasional Advisor

Q about scp

Hello
Is it possible to stream data from remote system using scp?
I mean like get huge file from some remote system and compress it before writing it to local disk.

Regards
Josef
4 REPLIES
Ivan Ferreira
Honored Contributor

Re: Q about scp

You can use something like this:

gzip -c | ssh dd of=/tmp/.gz

You have to replace by real host/files.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Bouda16
Occasional Advisor

Re: Q about scp


If I undestand it correctly, the packing process would by running on source server, but I need to run it on destination server :-(
Ivan Ferreira
Honored Contributor

Re: Q about scp

Then, you can try this:

This is executed on the host that is the source for the file:

sourcehost> dd if= | ssh "gzip > /tmp/.gz"

Or

This is executed on the host that is the destination for the file:

dsthost> ssh dd if= | gzip > /tmp/.gz

Welcome to the forum, please keep asigning points, if you are unsure how to do it, please review:

http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Mark Poeschl_2
Honored Contributor

Re: Q about scp

Bear in mind that any use of scp/ssh is going to be quite slow. With GigE infrastructure, I am anly able to achieve ~75 Mbps throughput for a single ssh/scp stream.