I ran into a weird problem where the scp command would refuse to copy a file to a remote host.
The command would complete OK (exit status of 0), but nothing would ever get copied. Head scratcher, and nothing obvious on stackoverflow.
The culprit: http://www.openssh.org/faq.html#2.9
If the above command produces any output, then you need to modify your shell initialization.
ssh yourhost /usr/bin/true