Skip to main content
Ssh command can send back the data on the remote standard output stream to the local standard input like:

ssh hoge@remote 'dd if=/dev/zero count=512' | dd of=/dev/null

Of course, this does not make sense, but works  :-)
 I often use this data transmission method for the backup purpose.

Recently, I was asked by the network administrator to limit the band width of ssh data transmission.

I didn't know how to archive his demand at first, but I found a good command-line tool, and worked it out.

It was "cpipe". I could install very easily with:

apt-get install cpipe

and here is an example how to use cpipe:

ssh hoge@remote 'dd if=/dev/zero count=512 | cpipe -s 1000' | dd of=/dev/null


Have fun!

Comments