Giving 'scp' go faster stripes

It is well documented around the web that transferring files with scp is not the quickest option on the block.

If you have no other option but to use scp to transfer files, there is a simple way to make scp go a little faster by changing the cipher used for encrypting the data transfer.

scp -c <cypher> local.file remote:/destination/remote.file

In using the blowfish rather than the default 3des in tests gave about a 50% increase in throughput.

$ scp -c blowfish dailyrep.rdf arcsvr:/reports/networker/20080610.rdf

On using arcfour cipher this was found to be faster than blowfish on the UltraSPARC T2 CPUs:

$ scp -c arcfour dailyrep.rdf arcsvr:/reports/networker/20080610.rdf

Note: 3des is the default cipher for protocol 1 and aes cbc is the default cipher for protocol 2.

Whilst different ciphers have impact on the performance on the data transfer, here in order from faster to slower are the ciphers are I have tested.

    arcfour >> blowfish >> aes >> 3des

My default choice for sometime has been blowfish for both speed and security.

Update You should be aware of the possible security problems of blowfish and it is suggested not to be used.

It is also a good idea to enable compression by default so that ssh performs better over a low-bandwidth link, such as a slow Internet connection. I put these lines into my ~/.ssh/config:

Host *
  Ciphers blowfish-cbc
  Compression yes
  CompressionLevel 6

The first line tells ssh/scp that these configuration applies to all hosts. The Ciphers line tells ssh/scp of version 2 to use blowfish-cbc. The 3rd and 4th lines enable compression and set its level.