Closed jeffbrl closed 1 year ago
I too am fighting the same issue.
I start wsl-ssh-pageant-amd64-gui from Start-up like this:
E:\OneDrive\Documents\Bin\wsl-ssh-pageant-amd64-gui.exe --wsl C:\Users\mgran\AppData\Local\Temp\ssh-agent.sock --winssh ssh-pageant --systray
I see the orange icon of the WSL-SSH-Pageant running in the system tray.
From WSL2:
[my-pc ~ $159] echo $SSH_AUTH_SOCK
/mnt/c/Users/mgran/AppData/Local/Temp/ssh-agent.sock
[my-pc ~ $160] ssh-add -L
Error connecting to agent: Connection refused
Any ideas?
If you're using WSL 2 you'll need to use the socat approach rather than the wsl argument. Unfortunately we can't have pipes between WSL 2 and Windows. I think this should be covered by #33
The suggestion to use socat in #33 is difficult for me to parse. I followed the instructions at https://github.com/BlackReloaded/wsl2-ssh-pageant which I don't fully understand but it seems to work.
I have a private key loaded in win-pageant at startup that I want to use within WSL. wsl-ssh-pageant worked for me until a few weeks ago. Note that I cannot rule out that I changed something on my end.
I am running wsl-ssh-pageant as follows.
C:\portables\wsl-ssh-pageant-amd64-gui.exe -systray -verbose -wsl C:\Users\jeffl\Documents\ssh-agent.sock
pageant runs at startup and successfully loads my key after I type the passphrase.
Within WSL bash, I am exporting the variable.
export SSH_AUTH_SOCK=/mnt/c/Users/jeffl/Documents/ssh-agent.sock
I expect to see the key loaded when I type 'ssh-add -L' in WSL.
Are my assumptions incorrect? What is going wrong here?