title: rsync gives protocol version mismatch on clean shell WSL->Debian
body: <p>I'm in a WSL bash shell trying to rsync to a remote cloudcast machine (Debian) over ssh. However, I keep getting protocol mismatch error.</p>
  
  <p>Some research turned up that the most common cause for this is an unclean shell, i.e.: a shell that prints something when logging in.
  In the remote machine, I added .hushlogin to the user home, and I also added PS1="" to .bashrc to get rid of the prompt (per some post somewhere).</p>
  
  <p>Testing for a clean shell shows it really is clean. The following logs in without any messages or even a prompt:</p>
  
  <p><code>ssh -tt -i ~/id_rsa -F /dev/null -oStrictHostKeyChecking=yes -oUserKnownHostsFile=/mnt/c/Users/anonyuser/AppData/Roaming/GGP/ssh/known_hosts cloudcast@123.123.12.12 -p 44722 --</code></p>
  
  <p>The following shows log.out is created with 0 bytes:</p>
  
  <p><code>ssh -tt -i ~/id_rsa -F /dev/null -oStrictHostKeyChecking=yes -oUserKnownHostsFile=/mnt/c/Users/anonyuser/AppData/Roaming/GGP/ssh/known_hosts cloudcast@123.123.12.12 -p 44722 -- false > log.out</code></p>
  
  <p>And yet this:</p>
  
  <p><code>rsync -a -v -e "ssh -tt -i ~/id_rsa -F /dev/null -oStrictHostKeyChecking=yes -oUserKnownHostsFile=/mnt/c/Users/anonyuser/AppData/Roaming/GGP/ssh/known_hosts cloudcast@136.112.98.92 -p 44722 --" lol.txt cloudcast@123.123.12.12:/home/cloudcast/</code></p>
  
  <p>gives the protocol mismatch version.</p>
  
  <p>Running with -vvvv shows this:</p>
  
  <p><code>(Client) Protocol versions: remote=1752392034, negotiated=31</code></p>
  
  <p>I've tried adding -q and/or -2 to the ssh command, per some other post somewhere, but no difference.</p>
  
  <p>I checked the rsync versions, and they're the same in the remote and local machine: </p>
  
  <pre><code>rsync  version 3.1.2  protocol version 31
  Copyright (C) 1996-2015 by Andrew Tridgell, Wayne Davison, and others.
  Web site: http://rsync.samba.org/
  Capabilities:
      64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
      socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
      append, ACLs, xattrs, iconv, symtimes, prealloc
  </code></pre>
  
  <p>The local ssh version is:
  OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017</p>
  
  <p>The remote ssh version is:
  OpenSSH_7.4p1 Debian-10+deb9u3, OpenSSL 1.0.2l  25 May 2017</p>
  
  <p>Any ideas on what's wrong?</p>