Slow Amazon EC2 rsync / SCP / SFTP upload speeds?

January 13, 2010

I experienced very slow speeds when uploading files to a small (m1.small) Amazon EC2 instance using the SCP and SFTP3 protocols with rsync, WinSCP and Tunnelier BitVise – around 30-40 kB/sec.

By simply switching the SSHd listening port to http (80), speeds went up to 1,4 MB/sec. Why Amazon would throttle the SSH port (22) I don’t know, but I hope this helps somebody else out there.

  • David

    Dumb linux questions: Please help me accomplish this – is it just sshd -p80 on the server? Or do I need to restart ssdh as well? Do I have to change all my clients to find this? Thanks.

    • Claus

      Hi David,

      sorry for the late reply. Here’s what I did on my Debian/Ubuntu servers to change SSH’s listening port:

      sudo nano /etc/ssh/sshd_config

      Change line:

      Port 22

      to:

      Port 80

      As an alternative you could also add a second Port line to have SSH listen on several ports:

      Port 22Port 80

      If you have a local iptables or other firewall running on the host, make sure the port is open. The same goes for EC2′s global firewall.

      Finally, restart SSH:

      sudo /etc/init.d/ssh

      You also have to make this change in the clients.

      // Claus

  • disasteraverted

    I have the same issue, even with using port 80… really frustrating. If I download certain things it can be very fast, I/O is not an issue… terribly slow.

Previous post:

Next post: