dlech / KeeAgent

ssh agent plugin for KeePass 2.x
http://lechnology.com/software/keeagent
Other
530 stars 35 forks source link

Sockfile on windows10: Invalid key length #287

Closed weyou closed 4 years ago

weyou commented 4 years ago

Set up the sockfile and use it in git bash. $ export SSH_AUTH_SOCK="C:\Users\me\.cygkeeagent"

But I got the following error:

$ ssh-add -l
error fetching identities: Invalid key length

The same error will happen in the output:

$ ssh -vT git@github.com
...
debug1: pubkey_prepare: ssh_fetch_identitylist: Invalid key length
...

The length of my key is 2048. It works OK if I set it to the built-in ssh-agent in git bash. Or set it to IdentityFile field in the ~/.ssh/config

OS: Windows10 1809
Keepass: 2.43.
KeeAgent 0.11.1.0

weyou commented 4 years ago

Well, I got the root cause. The newer version of OpenSSH refuses the key length < 1024. And I have an old key which length is 1023 in the KeeAgent, . The ssh will give up the attempt when it got such kind of key.