This problem can exist even in cases where the control-path is reconfigured to be shorter. I made that change in my configuration and it did nothing to resolve the issue.
`
<##.#.#.#> ESTABLISH CONNECTION FOR USER: [username]
<##.#.#.#> REMOTE_MODULE setup
<##.#.#.#> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/home/[username]/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘ConnectTimeout=10’, ‘##.#.#.#’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1421357644.16-197958593810564 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1421357644.16-197958593810564 && echo $HOME/.ansible/tmp/ansible-tmp-1421357644.16-197958593810564’”]
<##.#.#.#> PUT /tmp/tmpXLEUtz TO /home/[username]/.ansible/tmp/ansible-tmp-1421357644.16-197958593810564/setup
fatal: [##.#.#.#] => failed to transfer file to /home/USER/.ansible/tmp/ansible-tmp-1421357538.57-18056896264178/setup:
Received message too long 1919246692
`
As you can see, the number of characters is actually nowhere near the amount needed to trigger that error on my systems, and yet, that’s the error that is reported back.
I think something else is actually going on behind the scenes and the error reported back by ansible is making an assumption about the cause of the failure.
In addition, my /etc/ssh/sshd_config is correct for my OS and the path to sftp-server is correct.