In powershell I login via ssh machineA (with password) and then ssh machineB.

I am using SSHFS-Win to mount remote machineA folders (which works fine).


Now I want to map drive folder \scratch\data1 from machineB which can only be accessed via intermediate machineA.

Is it possible to do this using map network drive option or via command in powershell?

New contributor
Astro is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • This not a PowerShell issue and nothing PowerShell can do about this. This is Window's proper security boundaries. This is Double hop auth and Windows proper does not allow this without some efforts being used.So, you are on manice A, logged into machine B with your current identity, and trying to literally logon to a 2nd remote server from the remote logon, mapping the drive to the first hop, Machine B? Why not just map to your final target from where you are? Why are you not just using enter-session from to A the do the map from B to your target. This is interactive only, not explorer. – postanote Jul 1 at 3:18
  • You can use PowerShell in the double-hop auth use case, but not without configuration. Whether you can accomplish what you are after, relative to the aforementioned using SSHFS-Win, I've never seen or heard tell of. Access to a share is via the logged-on user identity and permissions for the target. Powershell is always based the user who started it. – postanote Jul 1 at 3:28

Your Answer

Astro is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.