如何从ssh访问映射的网络驱动器?

时间:2016-06-07 05:39:49

标签: windows batch-file ssh

我有一个脚本,它会弹到一个Windows框中。该脚本期望某些映射驱动器可用,但由于无法访问它而失败。在进一步调查时,我意识到当我通过ssh查看时,映射的驱动器实际上是不可用的,与我在本地看到它时相反。作为一个例子

C:\Users\username>net use
New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
             Y:        \\path\subpath             Microsoft Windows Network
The command completed successfully.


C:\Users\username>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

所以我的问题是,如何从ssh访问映射的驱动器

注意目标操作系统是Windows 2012 R2

0 个答案:

没有答案