tetractic / SK-SSH-Agent

An SSH agent that supports using FIDO/U2F security keys with PuTTY and OpenSSH for Windows.
GNU General Public License v3.0
22 stars 1 forks source link

Version 1.4 doesn't work as Pagent replacement for putty #1

Closed ghost closed 2 years ago

ghost commented 2 years ago

Putty version 0.76 (latest) doesn't load key from agent. Tried same key in ppk format in pageant (putty works) and connect to same server using openssh for windows (version 8.9p1) - also works. So the issue is exactly the combo SK-SSH-Agent + Putty. Any special configuration I need to do?

P.S. There is a difference in the pipe name between pageant and SK-SSH-Agent:

pageant

pageant.alex.stelmachonak.92a952cf9bc7607e95d0450ee457fc3004c290fab029a27470066fXXXXXXXXXX          1               -1

sk-ssh-agent

pageant.AliaksandrStelmachon.92A952CF9BC7607E95D0450EE457FC3004C290FAB029A27470066FXXXXXXXXXX          1               -1

So, there are two differences:

Some details: I am running this on corporate laptop, which is enrolled into AzureAD. USERNAME environment variable is AliaksandrStelmachon, so I am not sure where pageant get's it's username and if it makes the difference (looks like yes, since the agent not detected by putty).

ghost commented 2 years ago

OK, looks like I have some idea - looks like putty takes the username from the corporate e-mail I am using for login. So, not sure how/if this can be fixed, but I can help with testing debug builds or troubleshooting if you are willing to fix this. Thanks!

carlreinke commented 2 years ago

Looks like Pageant is getting the username in NameUserPrincipal format and SK SSH Agent is getting the username in NameSamCompatible format. I should be able to fix it.

ghost commented 2 years ago

@carlreinke great! Let me know if you will have test build for validation - I understand it might be difficult to emulate the AzureAD setup if you are not using it yourself. And thanks for quick response!

carlreinke commented 2 years ago

Give this a try: SK-SSH-Agent-test.zip

ghost commented 2 years ago

@carlreinke this build worked great - both putty and openssh, with regular and sk keys.

carlreinke commented 2 years ago

👍🏻

This fix is included in v1.4.1.