Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with ubuntu 22.04 #28

Open
xobotyi opened this issue Nov 16, 2022 · 3 comments
Open

Not working with ubuntu 22.04 #28

xobotyi opened this issue Nov 16, 2022 · 3 comments

Comments

@xobotyi
Copy link

xobotyi commented Nov 16, 2022

Attempted to use it with fresh ubuntu installation, all packages are upgraded, git installed.

Keys being added to ssh-agent via keepassxc
Relay is launched via following script

#!/usr/bin/env sh

export SSH_AUTH_SOCK=/tmp/ssh-agent-$$.tmp

if [ ! -S "$SSH_AUTH_SOCK" ]; then
  exec socat \
    UNIX-LISTEN:${SSH_AUTH_SOCK},umask=007,fork \
    EXEC:'npiperelay.exe -ep -s //./pipe/openssh-ssh-agent',nofork &
fi

If i do ssh-add -l - it properly shows keys - all the same with host.
BUT!
Attempt to clone repo from remote fails on ssh key validation [email protected]: Permission denied (publickey). (ssh config is empty)

Assuming that host system has same keys - i retried same from host system - everything works fine.
If i remove key from agend and add it manually in host system - verification fails.
If i stop relay, start local agent and add key there - everything works fine.

@mknj
Copy link

mknj commented Dec 12, 2022

i am using the powershell ssh-agent and i get the same results under 22.04

2022/12/12 09:58:24 connecting to //./pipe/openssh-ssh-agent
2022/12/12 09:58:24 connected
2022/12/12 09:58:27 copy from pipe to stdout finished: pipe closed
2022/12/12 09:58:27 socat[4180] E write(5, 0x561f0be6d000, 5): Broken pipe

under 20.04 only the first two lines are printed

2022/12/12 10:06:49 connecting to //./pipe/openssh-ssh-agent
2022/12/12 10:06:49 connected

It is not related to socat. When i copy the old socat and related libs to 22.04 it still does not work
It is not related to WSL1 or WSL2. I am using WSL2 with the same WSL-Linux-Kernel in both cases.

works under 20.04

socat -V
socat by Gerhard Rieger and contributors - see www.dest-unreach.org
socat version 1.7.3.3 on Oct 26 2019 17:42:04
   running on Linux version #1 SMP Wed Nov 23 01:01:46 UTC 2022, release 5.15.79.1-microsoft-standard-WSL2, machine x86_64

does not work under 22.04

LD_LIBRARY_PATH=$PWD ./socat -V
socat by Gerhard Rieger and contributors - see www.dest-unreach.org
socat version 1.7.3.3 on Oct 26 2019 17:42:04
   running on Linux version #1 SMP Wed Nov 23 01:01:46 UTC 2022, release 5.15.79.1-microsoft-standard-WSL2, machine x86_64

@backlands
Copy link

I was able to resolve this by updating the version of the OpenSSH agent that comes with Windows. There appear to be some new security features that break the backwards compatibility between the prepackaged Windows agent and the one in Ubuntu 22.04. I updated OpenSSH in Windows by using scoop (for the first time). I found this solution in the wsl-ssh-agent repo issues linked below.

rupor-github/wsl-ssh-agent#29

@trallnag
Copy link

I am using Microsofts (beta) flavour of OpenSSH and so far it has been working fine for me on Windows 11 22H2 and 23H2 with Ubuntu 22.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants