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

"How to use with Windows 10 native OpenSSH client" is no longer needed #58

Open
jtnord opened this issue Jan 5, 2023 · 2 comments
Open

Comments

@jtnord
Copy link

jtnord commented Jan 5, 2023

FYI,
As of gpg 2.4.0 (GpG4Win 4.1.0) there is a new option enable-win32-openssh-support that enables the correct pipe for Microsoft OpenSSH build to work out of the box.

@imkuang
Copy link

imkuang commented Jan 12, 2023

Thanks for the reminder, I just tried it and it worked fine for me. Now I can use the Windows native OpenSSH client to connect to my server via my GPG authentication subkey without additional software! (I've been using wsl-ssh-pageant with the Windows native OpenSSH client for SSH authentication for almost two years, thanks to the author benpye).

I haven't seen an explanation of this option on the official GnuPG website or anywhere else., so just for the reference of latecomers:

  1. put the enable-win32-openssh-support line in your gpg-agent.conf file (no longer need enable-ssh-support or enable-putty-support)
  2. put the keygrip id of your GPG authentication subkey in your sshcontrol file as before
  3. If you previously added the "SSH_AUTH_SOCK" environment variable to use wsl-ssh-pageant, remove it (Gpg4win seems to handle this environment variable automatically) or set it to \\.\pipe\openssh-ssh-agent
  4. kill gpg-agent and restart it by executing the command: gpg-connect-agent killagent /bye, gpg-connect-agent /bye

Then reopen a command session, run the ssh-add -L command, and you will see the SSH public key output from your GPG authentication subkey.

@navossoc
Copy link

navossoc commented Nov 1, 2023

@imkuang ssh-add-L is execute on Windows, right?
Is it possible to make the ssh-add -L list the same keys on WSL?

# ssh-add -L
Could not open a connection to your authentication agent.

My goal is to have a YubiKey on Windows, share it's keys to ssh-add on Windows (it's already working) and at the same use ssh-add on WSL 2.

My SSH_AUTH_SOCK is not set on WSL.

We have this pipe \\.\pipe\openssh-ssh-agent and /mnt/c/Users/windows/AppData/Local/gnupg/S.gpg-agent but neither seems to work.

I guess the only solution for this is still npiperelay?
Thanks.

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

3 participants