title: ssh from Linux to Windows - why need so many slashes in path?
body: <p>I am trying to run commands over <code>ssh</code> from Linux machine to Windows machine.</p>
  
  <p>Windows machine have OpenSSHx64 installed </p>
  
  <p>Following command with double quotes fails:</p>
  
  <pre><code>ssh user@win8-pc "ls -l \\\\172.21.15.120\\vol0slash"
  
  ls: cannot access 172.21.15.120vol0slash: No such file or directory
  </code></pre>
  
  <p>The same command with single quotes still fails, but at least display single slash:</p>
  
  <pre><code>ssh user@win8-pc 'ls -l \\\\172.21.15.120\\vol0slash'
  ls: cannot access \172.21.15.120vol0slash: No such file or directory
  </code></pre>
  
  <p>Surrounding path with single quotes almost works, but still one root slash is missing:</p>
  
  <pre><code>ssh user@win8-pc "ls -l '\\\\172.21.15.120\\vol0slash'"
  ls: cannot access \172.21.15.120\vol0slash: No such file or directory
  </code></pre>
  
  <p>Now finally adding fifth slash to UNC path root, did the trick:</p>
  
  <pre><code>ssh user@win8-pc "ls -l '\\\\\172.21.15.120\\vol0slash'"
  total 536
  drwxr-xr-x 1 Admin Domain Users   0 Jan 23 08:33 GeneralSystemDiagnostic
  drwxr-xr-x 1 Admin Domain Users   0 Jan 22 08:10 cifs
  -rw-r--r-- 1 Admin Domain Users 336 Jan 23 12:00 linux.txt
  drwxr-xr-x 1 Admin Domain Users   0 Jan 19 14:11 nfs
  </code></pre>
  
  <p>Can anyone explain the logic behind this behavior?</p>