Closed naa0yama closed 1 month ago
@naa0yama Is it helpful for you if wsl2-ssh-agent allows to specify the name of the named pipe?
wsl2-ssh-agent -namedpipe pageant.username.1dd0bd6d8626a420747bc803b28...
Perhaps you want to retrieve the name from pageant.conf. I think it works like this.
wsl2-ssh-agent -namedpipe $(grep -oP "IdentityAgent \"//\./pipe/\K[^\"]+" /mnt/c/.../pageant.conf)
Note that wsl2-ssh-agent must be started after pageant.conf is generated.
If this is what you want, I will try to implement it when I have time.
@mame First of all, thanks for reading Issue.
As you suggested, it would be a great experience for pageant.exe users if -namepipe
could be specified.
Perhaps you want to retrieve the name from pageant.conf. I think it works like this.
Yes, that is correct. Many users will probably use a shortcut on Windows with the following settings registered on startup.
“C:\Program Files\PuTTY\pageant.exe” --openssh-config “%USERPROFILE%\.ssh\pageant.conf”
I think I will use grep -oP
to pull out namepipe and configure it, as you suggested from this.
If this is what you want, I will try to implement it when I have time.
Thanks for considering it. If implemented, I would love to use it because it is simple to do!
@naa0yama Sorry for the delay. I have implemented -pipename
command-line argument and released v0.9.5. I think you can now use wsl2-ssh-agent -pipename pageant.username...
. If not, let me know.
NamedPipe is supported from pageant.exe version 0.77. This means that by keeping pageant.exe resident, the pageant_shm method and OpenSSH (NamedPipe) can coexist.
However, in reality, the implementation generates an Include file for OpenSSH and writes the dynamically generated NamedPipe destination, so it could not be used with wsl2-ssh-agent.
As a workaround, it would be fine to run ssh-agent (Windows) and pageant.exe, but I wanted to reduce the amount of Windows resident software if possible, so I raised this issue.