-
Notifications
You must be signed in to change notification settings - Fork 40
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
Use Windows OpenSSH as key backing, Instead of PuTTY #30
Comments
This is a nice idea - though the inverse I suppose of what this project is currently doing. If you think there is value in having this be a bidirectional bridge though I'd be totally happy to merge a PR. I unfortunately doubt I'll have much chance to look at this in the near future. |
Thanks @benpye , I'll start looking into it and attempting it. I'll comment here if I have any questions to ask. |
If this were possible, it would allow WinSCP (which only supports Pageant) to be used with Windows ssh-agent. That would be extremely helpful functionality for me |
I want to use putty as ssh client and windows openssh agent as key agent instead of pageant After I use windows 10 (1909) ssh-add loading my private key , putty still ask for a password, So any news of this ? |
I haven't heard from @ndbeals . This would be a nice feature. |
I'm about 2 weeks away from finishing my CS bachelor degree, and then it looks like I'll have lots of time this summer to work on this, it's scratching a personal itch too. There's not too much to figure out so it shouldn't be hard, hopefully you'll hear more from me soon! |
Taking a deeper look at the code, the gist of what I need to do is:
That last task may be more difficult than I initially bargained for, I'm not sure how difficult creating and managing a win32api window in Go is. Any knowledge you have about windows in go, and the pageant protocol would be awesome! |
Your analysis seems correct. For 3 I wouldn't worry about validation, Pageant and OpenSSH use exactly the same message format. I haven't previously needed to manage creating a window from go, but it shouldn't be too hard. You'll need to use One thing you may find useful is to build a debug build of PuTTy. I found at least in the other direction it helped me work out why Pageant wasn't responding as expected. I'll try and help if you have any questions but I can't guarantee I know every answer 🙂 |
I've made some decent progress @benpye, Querying the openssh agent works, I'm listening to GetMessage correctly and reading the WM_COPYDATA struct. I can get the map name but I'm hitting a wall when it comes to opening the file mapping. my work is here: https://github.com/ndbeals/wsl-ssh-pageant/blob/golang/pageant.go#L124 (and some chaned in main.go), If you have any insight it'd be helpful! |
Nothing appears obviously wrong - You could see if Process Monitor gives you any insight? |
Just wondering if you got any further with this or whether you know of any other solutions? |
First off, thank you @benpye for the help and examples, it saved untold time. I present https://github.com/ndbeals/winssh-pageant, It does what this feature request was asking for. Since making this request I have upgraded to wsl2, and now use npiperelay to get ssh in wsl, so I wanted a standalone executable instead. My little utility has no flags, all you do is run it, and it reads from the Thanks! |
Works great, awesome job! @ndbeals 👏 |
Works great for me too! Now I can finally use the Windows SSH agent with WinSCP, Sourcetree, etc! Thank you! |
Hello!
I'm trying to figure out how viable it'd be for me to use the windows OpenSSH ssh-agent as the key agent, instead of Pageant, and instead have this program "proxy" pageant requests back to the openssh-agent. Similar to https://github.com/rupor-github/ssh-agent-wsl (Which I'm already using) but with Pageant support.
Thanks for your time!
The text was updated successfully, but these errors were encountered: