4 ms·
Interesting! Do you mind elaborating a bit? I ssh into WSL for this reason.
by strictfp 6y ago
Interesting! Do you mind elaborating a bit? I ssh into WSL for this reason.
- nullify88 6y agoLikely something like this https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatib... Similarly, you can also do this with KeepassXC
- tssva 6y agoI followed the directions at https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows/ https://stuartleeks.com/posts/wsl-ssh-key-forward-to-windows... to get the combination of socat and npiperelay to work for this purpose. I did slightly deviate from his final script by using pgrep instead of the combination of ps and grep to detect if npiperelay was already running. Edit: These directions are very similar to those linked in the comment this is in reply to and either will work.
- dataflow 6y agoI haven't tried on WSL2, but on WSL1 this script also lets you integrate with KeePass's KeeAgent: https://gist.github.com/duebbert/4298b5f4eb7cc064b09e9d865dd490c9 https://gist.github.com/duebbert/4298b5f4eb7cc064b09e9d865dd...
- shawnz 6y agoIn the past I also used https://github.com/benpye/wsl-ssh-pageant https://github.com/benpye/wsl-ssh-pageant to go from WSL to Pageant (which I believe KeeAgent is also compatible with)
- shawnz 6y agoJust to throw another one of these bridge applications into the mix, here is one that allows Pageant apps to communicate with Windows' native ssh-agent. https://github.com/ndbeals/winssh-pageant https://github.com/ndbeals/winssh-pageant I use both this and rupor's wsl-ssh-agent from the other thread extensively.
- tssva 6y agoWhen I looked for a similar solution quite a while ago one didn't exist so I wrote my own. I have been meaning to clean the code up and post it for about 18 months now but have never gotten around to it. Need to check this out and see if it is worth still using what I wrote.
- shawnz 6y agoLet that be a lesson to not abandon your side projects :) I was in need of a solution to this issue for a long time before ndbeals thankfully released this about 9mo ago. And I was checking around the web regularly! I nearly wrote my own as well. The use case for me was to allow WinSCP and Sourcetree to be used with the Windows ssh agent.
- tssva 6y agoWinSCP is the reason I wrote mine. I'll probably stick with the one I wrote since it is win32 native and seems to consume less resources. I'm not a developer by trade and barely one by hobby. This was the first and so far only win32 app I have written so the code while functional is very ugly. I'm sure anyone familiar with win32 programming would be horrified. I should just throw it over the wall as is. Obviously the cleanup I was going to do before releasing it is never going to happen.