diff options
Diffstat (limited to 'pkg/machine/wsl/machine.go')
-rw-r--r-- | pkg/machine/wsl/machine.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/machine/wsl/machine.go b/pkg/machine/wsl/machine.go index 1da042f6a..dff7bfef9 100644 --- a/pkg/machine/wsl/machine.go +++ b/pkg/machine/wsl/machine.go @@ -830,7 +830,15 @@ func launchWinProxy(v *MachineVM) (bool, string, error) { return globalName, "", err } - dest := fmt.Sprintf("ssh://root@localhost:%d/run/podman/podman.sock", v.Port) + destSock := "/run/user/1000/podman/podman.sock" + forwardUser := v.RemoteUsername + + if v.Rootful { + destSock = "/run/podman/podman.sock" + forwardUser = "root" + } + + dest := fmt.Sprintf("ssh://%s@localhost:%d%s", forwardUser, v.Port, destSock) args := []string{v.Name, stateDir, pipePrefix + machinePipe, dest, v.IdentityPath} waitPipe := machinePipe if globalName { |