title: How to access mapped network drive from ssh?
body: <p>I have a script which sshes to a windows box. The script expects certain mapped drives to be available but fails as it is unable to access it. On investigating further, I realized that the mapped drive is actually unavailable when I view it via ssh in contrast to when I see it locally. As an example</p>
  
  <pre><code>C:\Users\username&gt;net use
  New connections will be remembered.
  
  
  Status       Local     Remote                    Network
  
  -------------------------------------------------------------------------------
               Y:        \\path\subpath             Microsoft Windows Network
  The command completed successfully.
  
  
  C:\Users\username&gt;ssh localhost "net use"
  Could not create directory '/home/username/.ssh'.
  The authenticity of host 'localhost (::1)' can't be established.
  RSA key fingerprint is 7b:52:27:8f:19:ea:22:c4:0e:a2:7d:30:4f:3b:7d:d3.
  Are you sure you want to continue connecting (yes/no)? yes
  Failed to add the host to the list of known hosts (/home/username/.ssh/known_hos
  ts).
  username@localhost's password:
  New connections will be remembered.
  
  
  Status       Local     Remote                    Network
  
  -------------------------------------------------------------------------------
  Unavailable  Y:        \\path\subpath             Microsoft Windows Network
  </code></pre>
  
  <p>So my question is, how to access a mapped drive from ssh</p>
  
  <p><strong>Note</strong> The target OS is Windows 2012 R2</p>