benpye / wsl-ssh-pageant

A Pageant -> TCP bridge for use with WSL, allowing for Pageant to be used as an ssh-ageant within the WSL environment.
BSD 2-Clause "Simplified" License
612 stars 40 forks source link

Specifying non-existant directory fails silently #15

Closed horenmar closed 5 years ago

horenmar commented 5 years ago

By mistake, I specified a path that doesn't exist as the path for WSL socket, which failed silently, without any message. I would like if either wsl-ssh-pageant told me so, or if it created the directory.

horenmar commented 5 years ago

Apart from that, I got yubikey -> ssh in wsl redirection working so 👍 for the project.

Do you happen know anything about why enable-ssh-support and doing socat between socket on WSL side and npiperelay on the windows side doesn't work?

benpye commented 5 years ago

I have never been able to work out where enable-ssh-support exposes the socket on the Windows side - if it is a named pipe then npiperelay really ought to work. I did mess around with enable-ssh-support for some time but I never got it working.

This definitely should produce a warning or an error though, I'll look into it.

benpye commented 5 years ago

Hey, so I think this should be fixed in the Go version https://github.com/benpye/wsl-ssh-pageant/releases/tag/050219 . Can you confirm?

istvan-andrasi commented 5 years ago

I just upgraded to the go version, and it works nicely for me. So I tried this out and I think it now works as expected:

> wsl-ssh-pageant.exe --wsl /nothing/wsl-ssh-pageant.sock
2019/02/26 17:02:31 Could not open socket /nothing/wsl-ssh-pageant.sock, error 'listen unix /nothing/wsl-ssh-pageant.sock: bind: A socket operation encountered a dead network.'

I personally like failing like this rather than silenty creating directories.

benpye commented 5 years ago

Great, I'm going to close this issue then. Now that Go 1.12 is released I'll update and setup CI for the Go version. Thanks!