SCP is a great way to copy files from somewhere to somewhere else, but as we all know it can be slower than (insert slow metaphor here). Here’s a way you can get way speedier(really a word?) transfers using scp.
scp -c arcfour -C sourcefile desthost:
Yay! I posted.
More From derek
- My new storage dilemma, resolved.
- End of Lulz (maybe?)
- MyCleanPC/Cyberdefender/MaxMyPC is full of it.
derek Recommends
- Free Backlinks…..Get Backlinks Every Day! (Chad Nicely)
- The Warrior Forum (Chad Nicely)







Fuck you..is this a tip
this is 10 time slower than simple scp without any option
First off, don’t be a jerk. If your mileage varies from the posted, then you probably are running on crappy hardware/network/something or you’ve got sunspots/earthquakes/emf/stupidity. The following is verified by neuhalfen.name. It’s down at the moment, but google cache is here: http://webcache.googleusercontent.com/search?q=cache:_4zYEhpHEW4J:www.neuhalfen.name/2009/02/04/scp_performance_gain_by_using_right_algorithm/+openssh+scp+arcfour+vs+blowfish&hl=en&client=firefox-a&gl=us&strip=1
– Begin shamelessly copied from googlecache content –
“No explicit cipher (aes128-cb)
Merkur:jens jens$ scp jens@helios:/export/home/jens/XXXXX /dev/null
XXXXX 6% 143MB 23.7MB/s 01:22 ETA^CKilled by signal 2.
This is the default behaviour on my machines. Other setups might choose a different default algorithm. According to the OpenSSH homepage the list of availabe candidates is (cited from the man page):
Ciphers
Specifies the ciphers allowed for protocol version 2 in order of
preference. Multiple ciphers must be comma-separated. The default is
“aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,
aes192-cbc,aes256-cbc”
Using 3des
I expected 3des to be quite slow, and I wasn’t disappointed:
Merkur:~ jens$ scp -c 3des jens@helios:/export/home/jens/XXXXX /dev/null
XXXXX 3% 82MB 11.7MB/s 02:51 ETA^CKilled by signal 2.
As expected, 3des will not be our performance king today.
Using Blowfish
The next candidate was Blowfish. I expected at least aes performance from it. Let’s see, how it worked out:
Merkur:jens jens$ scp -c blowfish jens@helios:/export/home/jens/XXXXX /dev/null
XXXXX 29% 615MB 36.0MB/s 00:40 ETA^CKilled by signal 2.
Final candidate: RC4
The final candidate is the only stream cipher in the suit: arcfour.
Merkur:~ jens$ scp -c arcfour jens@helios:/export/home/jens/XXXXX /dev/null
XXXXX 9% 202MB 51.7MB/s 00:36 ETA^Killed by signal 2.
Conclusion
Speedwise arcfour wins hands down. I did not expect a more than doubled performance over the default aes128-cbc. Who would have thought that switching the algorithm makes that much of a difference.”
– End googlecache content –
The default cipher after OpenSSH v4.7 is blowfish, which as you can see is slower than arcfour. Sadly, I am right, and you still have crappy hardware. I will note however that arcfour is MUCH less secure, but if you’re looking for speed it cant be beat. Except by http://www.psc.edu/networking/projects/hpn-ssh/theory.php .
I’ve tried SSH with “-c arcfour” and it showed a significant improvement, but adding “-C” didn’t help, if not to say it slowed down. Manpage says -C can improve the performance, but from my tests I think it can be a burden if the CPU/network is not balance.
thanks!