mame / wsl2-ssh-agent

A bridge from WSL2 ssh client to Windows ssh-agent.exe service
MIT License
102 stars 6 forks source link

New implementation based on Shell #9

Closed Hill-98 closed 11 months ago

Hill-98 commented 11 months ago

After #7, I've been thinking about moving away from using PowerShell as a bridge because the input/output doesn't seem that reliable.

So with this new Shell-based implementation, its core uses SSH agent forwarding, which should be more stable and efficient.

I'm not sure what effect it has on the speed of WSL startup, so can you test it for me?

Here: https://github.com/Hill-98/wsl2-ssh-agent-shell

Hill-98 commented 11 months ago

I want to execute it under Windows, observe whether WSL is started through Windows events, and then run SSH agent forwarding. But there seemed to be no WSL related events for Windows, so I had to give up this idea.

Hill-98 commented 11 months ago

However, it does not implement extended message filtering. If there is no problem, can extended message filtering be implemented in this project?

mame commented 11 months ago

At first, I am reasonably satisfied with the current wsl2-ssh-agent. I am happy to introduce a change that would help those who is using appendWindowsPath = false, but I don't have the motivation for anything more than that.

I designed wsl2-ssh-agent in mind of user experience that "downloads a binary, adds one line to the .bashrc, and works nice". It seems that the basic policy is different from your project. (I do never deny yours, but TBH I don't like to use it.)

I am technically interested in the idea of doing the ssh.exe version check in repeater.ps1 that came up in the discussion #7 with you. If you are not interested in that, I will give it a try later.

Hill-98 commented 11 months ago

Well, if you don't want to implement a bridge in the form of SSH agent forwarding, I would refactor Repeater.ps1 to add ssh-agent.exe version checking and extended message filtering to it.