Code Monkey home page Code Monkey logo

Comments (4)

rupor-github avatar rupor-github commented on June 1, 2024

This question is not related to wsl-ssh-agent...

You did not put your keys into windows ssh-agent service (using ssh-add). Instead, you are reading them directly from files judging from your configuration IdentityFile ~/.ssh/jibbers42-ed25519 and IdentityFile ~/.ssh/work-ed25519. As such wsl-ssh-agent has nothing to read from ssh-agent on windows end and make available on WSL2 side.

This could be easily verified by issuing ssh-add -L on both Windows side and WSL2 side and comparing results.

from wsl-ssh-agent.

jibbers42 avatar jibbers42 commented on June 1, 2024

I apologize for being off topic - I just hoped it was something someone here had experience with already since the WSL2 to Windows SSH agent would be out of experience for most people.

My thought was that the IdentityFile ... configuration told ssh which key to use, but it still used ssh-agent for credentials (I don't really know how it works). My keys have a passphrase that I am not prompted for so I'm sure I added them to ssh-agent and it's being used.

Both sides have the same ssh-add -L output...

Windows:

> ssh-add -L
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3E+1ehmyyQjfmDQ0a05L3jNvl+R3YskXZJCpPZxMGN work-ed25519
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZHEf5lVMNMUFtOmlHKl76nOtCKY433nFqiNT22PE6m jibbers42-ed25519

WSL2:

$ ssh-add -L
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK3E+1ehmyyQjfmDQ0a05L3jNvl+R3YskXZJCpPZxMGN work-ed25519
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAZHEf5lVMNMUFtOmlHKl76nOtCKY433nFqiNT22PE6m jibbers42-ed25519

from wsl-ssh-agent.

jibbers42 avatar jibbers42 commented on June 1, 2024

For anyone else that runs into this, I copied my ssh keys and .ssh\config to the WSL2 side. Since the config uses tilde for paths, the same paths work from both Windows and WSL2 and didn't need to be fixed up in any way. Now the correct key is being used from both sides and ssh-agent on Windows is authenticating everything.

from wsl-ssh-agent.

rupor-github avatar rupor-github commented on June 1, 2024

Agreed, this is as confusing as it could be... If you copied both keys and config - you may not need wsl-ssh-agent at all :) Not sure but in the future something like this: https://www.openssh.com/agent-restrict.html may be useful in such cases....

from wsl-ssh-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.