This happens only on some of the servers. I've used the same wrapper for many projects and never had problems with it. I just setup Capistrano with forward_agent that uses a different wrapper and it's also failing.

Could probably also be fixed by altering MTU, as per https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1254085 but I prefer to edit ssh config.

------EDIT------

Although I initially fixed it by changing the cipher it did turn out the underlaying problem was the MTU. Even though the above solution fixes the problem with SSH many SSL connections are also affected by it. Below I present a solution that solved all of them once and for all.

Set the MTU to something lower. Default for Ethernet is 1500, but I kept experiencing problems until I lowered it to 1468

sudo ip link set dev eth0 mtu 1468

If the above solves the problem, add the following two lines to /etc/dhcp/dhclient.conf to make sure reboot doesn't reset the setting: