Oh, it's probably just "echo -n" not being portable in tramp-sh-handle-write-region. I attach the instrumented log as per your instructions.