buptczq / WinCryptSSHAgent

Using a Yubikey for SSH Authentication on Windows Seamlessly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use with Pageant?

tmtron opened this issue · comments

I am currently looking for a replacement for weasel-pageant.

My understanding is that WinCryptSSHAgent should work

  • start pageant - load private key (enter password)
  • just to test, I can now start Putty and connect to the server (i..e Putty will automatically find the key loaded by pageant)
  • Start WinCryptSSHAgent
    • it will show up in the windows system tray
    • right-click the tray-icon
      • When I select Show Public Keys it shows one key - BUT this is not the one that I have loaded in Pageant
        • Question 1: Is this expected? What is this key used for?
  • now I try to connect from a WSL2 terminal
  • open a WSL2 terminal
    • right-click the WinCryptSSHAgent icon
      • click Show WSL2 / Linux on Hyper-V settings
      • click OK to copy the command
    • in WSL2
      • create a file: win-ssh.bash and paste the copied code
      • source win-ssh.bash
      • now ssh-add -l works and shows a key - but again: not the key that I've loaded in Pageant
        • Question 2: What am I missing, so that the Key from Pageant shows up?

Per the README 'This project allows other programs to access SSH keys stored in your Windows Certificate Store for authentication'. It can replace pageant and make keys from the windows certificate store available to other apps that speak the pageant protocol, but it cannot read keys from pageant.

You may be able to use puttygen to export your putty key as PEM format and import that into the windows certificate store. If that works you would no longer need pageant.

but it cannot read keys from pageant.

oh, sorry: I've missed that...

You may be able to use puttygen to export your putty key as PEM format and import that into the windows certificate store. If that works you would no longer need pageant.

Well, I like about pageant, that I must always explicitly load the keys and enter the passwords. So for now, I'll stick to weasel-pageant.