I'm having the same experience as described. I downgraded this function (see the instructions in the magit issue), and that fixed the problem for me. For what it's worth, on the remote host I see hung `git` processes for each time I tried this and bailed with C-g. If I strace any one, it's stuck reading stdin. (To see this, you need to use ControlMaster, otherwise the process is reaped by the ssh parent ending.) I think the hang is caused by magit sending a patch, followed by EOF and then the process never ends, so magit waits forever, and the patch is never applied.