-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not access a mapped network drive through ssh #1734
Comments
Drives are mapped in the context of user sessions. The "server" does not have a mapped drive. So, has the drive been mapped in the context of the ssh session?
Authenticating with a public key will not give you access to network resources from the target machine that require authentication (i.e. the double-hop problem). So, its likely that even if you tried to map a drive, it would fail if it required authentication. |
Just to add some more info, while you can have a drive mapping for a particular user in the registry they are not actually created by Windows when you logon through the network. They are only done when you have an interactive or RDP logon so if you want to use a mapped drive you need to map it in your session manually. At that point you may as well just use the UNC path. In saying that what mwtrigg is saying about the double hop problem is going to be an issue when you use public key authentication. |
Hi, The drive hasn't been mapped in the context of the ssh session. |
If you need to access file on a remote file server you essentially have to provide a way so that the remote session can use that password to access the file server. This can be done automatically if you use password authentication or with Kerberos + delegation. This could also be done explicitly by calling As for mapped drives I would personally give up on using them in SSH. You can always map it manually again in the SSH session but at that point you are better off using the UNC path anyway. Leave mapped drives for interactive usages when you log on normally or with RDP, use UNC for the rest. |
Using UNC paths directly has its own issues, however. For example:
So while the advice to just use UNC paths sounds good in theory, in practice, there is probably well-known software the user wants to use that simply does not play nice with alternatives to mapped network drives, like direct use of UNC paths, or symlinks to the UNC paths. (This is ignoring all the authentication issues, which I worked around with a PowerShell profile containing a |
I have one server (Microsoft Windows Server 2016) with OpenSSH installed; On this server I have one mapped network drive (K). On this network drive I have one git Project. From another computer I want to clone that git project, but it is saying that is not a git repository. From the server I have direct access to the K.

I have access with ssh to the server, I can clone project that are stored on local drives of the server.
I am using the public key authentication.
How can I clone a project from a mapped network drive from another computer.
The text was updated successfully, but these errors were encountered: