It turned out to be the source of the problem is ssh communication. I had .ssh keys setup to avoid prompting of passwords for ssh. I could have not suspected ssh first, because ssh over my destination machine was just working fine. However I noticed the problem when scp was not working (but ssh was ok!). After I removed my .ssh directory, the problem disappeared.
However, this bug needs to be fixed to give proper error message when ssh communication does not work properly.
It turned out to be the source of the problem is ssh communication. I had .ssh keys setup to avoid prompting of passwords for ssh. I could have not suspected ssh first, because ssh over my destination machine was just working fine. However I noticed the problem when scp was not working (but ssh was ok!). After I removed my .ssh directory, the problem disappeared.
However, this bug needs to be fixed to give proper error message when ssh communication does not work properly.