Closed RAnders00 closed 8 months ago
Sorry for the late reply. Does this error always occur?
I've not gotten it to work even once, so yes, always. Thank you for taking the time to look into this. Let me know if you need any more details.
To isolate the cause, could you try replacing omni-socat with npiperelay to see if it works? (npiperelay is a software similar to omni-socat that can proxy named-pipes via socat.) Please perform the following operations on WSL2.
# download npiperelay_windows_amd64
$ wget https://github.com/jstarks/npiperelay/releases/download/v0.1.0/npiperelay_windows_amd64.zip
$ unzip npiperelay_windows_amd64.zip
$ ps axuw|grep socat
masahide 99065 0.0 0.0 6976 1832 ? Ss 19:35 0:00 socat UNIX-LISTEN:/home/masahide/.ssh/agent.sock,fork EXEC:/home/masahide/omni-socat/omni-socat.exe -debug,nofork
masahide 99107 0.0 0.0 8172 660 pts/1 S+ 19:36 0:00 grep --color=auto socat
# kill omni-socat.exe
$ killall socat
# start $HOME/npiperelay.exe
$ setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$HOME/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
$ ps axuw|grep npi
masahide 98717 0.0 0.0 6976 1836 ? Ss 19:29 0:00 socat UNIX-LISTEN:/home/masahide/.ssh/agent.sock,fork EXEC:/home/masahide/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent,nofork
masahide 98740 0.0 0.0 8172 724 pts/1 S+ 19:29 0:00 grep --color=auto npi
# list ssh agent keys
$ ssh-add -l
256 SHA256:...............
While tinkering around, I was able to find out what went wrong:
In omni-socat/ubuntu-bash.setup.sh
, I replaced the socat start line with this to get the output:
(setsid socat UNIX-LISTEN:$SSH_AUTH_SOCK,fork EXEC:"$OMNISOCATCMD",nofork &) >$HOME/omni-socat/socat-output 2>&1
Which shows the following output:
2024/01/07 15:35:04 socat[89] E exactly 2 addresses required (there are 0); use option "-h" for help
Which, I found out, is caused by me not having a .ssh
directory.
mkdir $HOME/.ssh
fixes everything.
@RAnders00 Thank you for the pull request.
When I run
ssh-add -l
, I get the following error:I've read the previous issue on this (#16), here are my command outputs for the same commands you wanted the other issue reporter to run:
Using pageant apps and OpenSSH apps on Windows works just fine.
I'm not sure if this is the problem, but when I run omni-socat.exe manually from WSL2, I get:
I ran
strace
on omni-socat: