title: Windows: rsync working in msys but not cygwin (git bash)
body: <p>I'm connecting from a Windows 10 box to a Linux system. I'm using msys and git bash in parallel. I want to sync files on the Linux machine using rsync. Currently it is working in msys but not in git bash.</p>
  <p>I want it to work in git bash because it's awkward to use both in parallel. I'm choosing git bash over msys because my team needs git anyways. My fellow team members are supposed to use the script I'm writing too and they don't know msys but git bash.</p>
  <p>The command I'm using is</p>
  <pre><code>rsync -iru -e ssh $(ls -d [^O]*) &quot;advanced@$ip:/home/user/&quot;
  </code></pre>
  <p>In msys this works. In git bash I get the error message.</p>
  <pre><code>dup() in/out/err failed
  rsync: read error: Connection reset by peer (104)
  rsync error: error in rsync protocol data stream (code 12) at /usr/src/rsync/rsync-3.0.8/io.c(760) [sender=3.0.8]
  </code></pre>
  <p>(The local rsync version is 3.0.8 and both msys and git bash use the same binary.)</p>
  <p>I know msys and git bash use different ssh binaries. Although a diff shows they are identical, I tried this in git bash</p>
  <pre><code>rsync -ru -e '/c/MinGW/msys/1.0/bin/ssh.exe' $(ls -d [^O]*) &quot;advanced@$ip:/home/user/&quot;
  </code></pre>
  <p>which still fails.</p>
  <p>It looks like there are some hidden settings being used by ssh, which is plausible insofar msys and git bash use different home directories (a dedicated one and my Windows user directory respectively). However, their respective .ssh directories only contain the usual suspects (id_rsa, id_rsa.pub, known_hosts) and no files that could contain any settings.</p>
  <p>Edit:</p>
  <p>Below is the contents of /var/log/auth.log. ...211 is the Linux box, ...2 the Windows machine.</p>
  <p>Successful (with mingw):</p>
  <pre><code>sshd[25494]: Accepted publickey for advanced from 192.168.47.2 port 32589 ssh2: RSA SHA256:ofWD8Ii5DnGUyK2wUDpl71KhQcRajEqBWv6n27YwQ8g
  sshd[25494]: pam_keyinit(sshd:session): Unable to look up user &quot;advanced&quot;
  sshd[25494]: pam_unix(sshd:session): session opened for user advanced by (uid=0)
  sshd[25500]: Received disconnect from 192.168.47.2: 11: disconnected by user
  sshd[25494]: pam_unix(sshd:session): session closed for user advanced
  sshd[25500]: Disconnected from 192.168.47.2
  </code></pre>
  <p>Unsuccessful (with git bash)</p>
  <pre><code>sshd[24626]: Accepted publickey for advanced from 192.168.47.2 port 32488 ssh2: RSA SHA256:ofWD8Ii5DnGUyK2wUDpl71KhQcRajEqBWv6n27YwQ8g
  sshd[24626]: pam_keyinit(sshd:session): Unable to look up user &quot;advanced&quot;
  sshd[24626]: pam_unix(sshd:session): session opened for user advanced by (uid=0)
  sshd[24626]: pam_unix(sshd:session): session closed for user advanced
  </code></pre>
  <p>I don't know what the 'Unable to look up user' is about. When I ssh there as advanced, the same line appears in the log, but I get authenticated as 'advanced'  - without root privileges as the '(uid=0)' seems to indicate.</p>