Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The server is an ubuntu server 11.04 with sshd.

SSH works fine for console programs.

But data transfer is slow, which is very annoying when transferring large files.

I tried two different client programs and changed the port, but the speed is always the same. I know the server can transfer data a lot faster over SSL, which afaik uses AES. I configured my SSH client to use AES, too, but no effect.

Why is using SSH multiple times slower than SSL and is there a way to improve transfer speed of SSH?

share|improve this question
    
what happens when you try sftp? you could try defining a different port in your ssh config file so it doesn't use 22, but that could be troublesome. –  AlanTuring Sep 28 '12 at 21:40
    
I am using sftp (ssh file transfer). And I already did change the port. –  Floste Sep 28 '12 at 21:49
    
Well there's 2 explanations then for why it is so slow. The first is that you are being throttled specifically on SSH, which very unlikely. The second is that you are transferring a lot of smaller files but in bulk. Each time a file is transferred over sftp, there are several checks each side makes to make sure the file is secure, and this takes up a lot of bandwidth, therefore i would suggest compressing the high number of files into one zip file and then transferring over. Other than that, i really don't know –  AlanTuring Sep 28 '12 at 22:14
    
Have you also tried rsync? Can you report on the mean transfer speed that you observed with scp/sftp and with ssl (to give an impression)? –  Vincent Sep 28 '12 at 22:16
    
The solution is not to use ssh for data transfer. I installed an ftp-server which supports tls and a vpn server. Works fine. –  Floste Oct 12 '12 at 18:52
show 1 more comment

2 Answers

There's a project called HPN-SSH(High Performance SSH/SCP), it's the default client in FreeBSD since a while back so I'll think it could be considered as stable. I've notice a small speed gain to/from my backup server on my LAN, but the real gain from HPN-SSH as I understand it is over longer distances(read more about that on their site). I don't know if this is the case for you.

But if you really want to improve performance you could change to a simpler encryption algorithms like blowfish or archfour. In general I don't see that as a problem.

share|improve this answer
add comment

I'm guessing one CPU is really slow or already tapped out. Ways to speed it up are using the above mentioned 'hpn' patch to allow you to forgo encryption altogether or if you are unwilling to lose all encryption (can't blame you), you can switch to using 'arcfour' encryption using the Ciphers option either at the CLI or in ~/.ssh/config. It's considerably less resource intensive than the standard encryption algorithms, but at the same time it's not quite as secure. I get incredibly slow ssh transfer speeds on my eee PC that runs a 1.6 GHz single core CPU.

Example: ssh -oCiphers='arcfour' user@host

If you're using scp, do this: -oCiphers='arcfour'

If you're using rsync for the transfer, then do this: -e'ssh -oCiphers=arcfour'

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.