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

[Error] Load key [...] invalid format #379

Closed
antonionardella opened this issue Feb 28, 2022 · 7 comments
Closed

[Error] Load key [...] invalid format #379

antonionardella opened this issue Feb 28, 2022 · 7 comments

Comments

@antonionardella
Copy link

Hello here!

Today I have an issue using the Ledger Nano to log in using the ledger-agent. It worked without issues until 3-4 days ago.

2022-02-28 10:13:01,816 WARNING      error: 27                                                                                            [server.py:100]
Traceback (most recent call last):
  File "/home/[REDACTED]/.local/lib/python3.10/site-packages/libagent/server.py", line 95, in handle_connection
    reply = handler.handle(msg=msg)
  File "/home/[REDACTED]/.local/lib/python3.10/site-packages/libagent/ssh/protocol.py", line 98, in handle
    log.warning('Unsupported command: %s (%d)', msg_name(code), code)
  File "/home/[REDACTED]/.local/lib/python3.10/site-packages/libagent/ssh/protocol.py", line 54, in msg_name
    return ids[code]
KeyError: 27
Load key "/tmp/trezor-ssh-pubkey-5pcf4wio": invalid format
[REDACTED]@[REDACTED]'s password

Any ideas what I could look at?

Thanks

@mavaa
Copy link

mavaa commented Feb 28, 2022

Having the same problem. I'm not 100% sure, but I think this is related to this feature in openssh 8.9(?)
https://www.openssh.com/agent-restrict.html

Temporary workaround for me was to downgrade to openssh 8.8

@mavaa
Copy link

mavaa commented Feb 28, 2022

The code "27" from openssh is called "SSH_AGENTC_EXTENSION" which seem to be documented here: https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.agent

I assume this has te be hadled somehow in libagent/ssh/protocol.py->handle, but I have no idea how that should be done.

@antonionardella
Copy link
Author

I can confirm that downgrading openssh to 8.8 also worked on my Manjaro system.

@onlykey
Copy link
Contributor

onlykey commented Mar 15, 2022

@romanz It looks like this issue was introduced with 'OpenSSH_8.9p1, OpenSSL 1.1.1m 14 Dec 2021'

Currently, this affects Arch and Manjaro Linux distributions as they have the latest OpenSSH version. Debian based Linux is not affected yet as it is still on 'OpenSSH_8.4p1 Ubuntu-6ubuntu2.1, OpenSSL 1.1.1l 24 Aug 2021' but this will be a future problem.

@romanz
Copy link
Owner

romanz commented Mar 16, 2022

Many thanks for reporting this issue!

@yanchenko-igor
Copy link
Contributor

@antonionardella Please try PR #384

@onlykey
Copy link
Contributor

onlykey commented Mar 16, 2022

@yanchenko-igor I tested the PR on Arch Linux and it fixes the issue 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

5 participants