trustcrypto/onlykey-agent

Onlykey-agent does't work with last update of Manjaro

Closed this issue · 15 comments

Hi,
when i try to connect to my few ssh server, i cannot connect, it gave me the following error:
2022-03-03 19:13:44,349 WARNING error: 27 [server.py:100]
Traceback (most recent call last):
File "/home/pino/.local/pipx/venvs/onlykey-agent/lib/python3.10/site-packages/libagent/server.py", line 95, in handle_connection
reply = handler.handle(msg=msg)
File "/home/pino/.local/pipx/venvs/onlykey-agent/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/pino/.local/pipx/venvs/onlykey-agent/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-hvfjd9s2": invalid format

Recently manjaro and arch have upgrade python to version 3.10, but onlykey-agent works, yesterday with a new major update it doesn't work nomore.
I have tried with linux mint (python 3.8) and it works.
I have upgrade the firmware and the app to the latest version, and i have two onlykeys and both throw the same error.
Thanks

I'm experiencing the same issue on my main arch install.

@chrischambers @Stibax I tried to reproduce issue on Ubuntu with Python 3.10 but no luck. Can you send me the output of verbose command like this:

onlykey-agent user@host -vvv -c

And I will try and reproduce issue on arch

@chrischambers @Stibax Still no luck reproducing this issue on Arch. I set up Arch virtual machine here:

https://www.osboxes.org/arch-linux/
https://sourceforge.net/projects/osboxes/files/v/vb/4-Ar---c-x/2022.01.01/XFCE/64bit.7z/download

I updated, installed onlykey-agent from pip and no errors were found when attempting to SSH to an Ubuntu server.
image
image

Are you still experiencing this issue and if so can you provide additional information to reproduce?

Hi,
thanks for your help.
No it doesn't work unluckly. The verbose log it's the following:

48:00,795 DEBUG Setting skey slot = 132 [onlykey.py:56]
2022-03-10 18:48:00,795 DEBUG parsed identity: {'proto': None, 'user': 'pino', 'host': '10.1.1.104', 'port': '55511', 'path': None} [interface.py:30]
2022-03-10 18:48:00,795 DEBUG identity parts: ['ssh://', 'pino@', '10.1.1.104', ':55511'] [interface.py:46]
2022-03-10 18:48:00,795 INFO identity #0: ssh://pino@10.1.1.104:55511|ed25519 [init.py:287]
2022-03-10 18:48:01,256 DEBUG connected [client.py:170]
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/init.py", line 1100, in emit
msg = self.format(record)
File "/usr/lib/python3.10/logging/init.py", line 943, in format
return fmt.format(record)
File "/usr/lib/python3.10/logging/init.py", line 678, in format
record.message = record.getMessage()
File "/usr/lib/python3.10/logging/init.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/home/pino/.local/bin/onlykey-agent", line 8, in
sys.exit(ssh_agent())
File "/home/pino/.local/bin/onlykey_agent.py", line 5, in
ssh_agent = lambda: libagent.ssh.main(DeviceType)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 185, in wrapper
return func(*args, **kwargs)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 301, in main
command = ['ssh'] + ssh_args(conn) + args.command
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 30, in ssh_args
pubkey_tempfile, = conn.public_keys_as_files()
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 235, in public_keys_as_files
for pk in self.public_keys():
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 221, in public_keys
self.public_keys_cache = conn.export_public_keys(self.identities)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/client.py", line 24, in export_public_keys
with self.device:
File "/home/pino/.local/lib/python3.10/site-packages/libagent/device/interface.py", line 126, in enter
self.conn = self.connect()
File "/home/pino/.local/lib/python3.10/site-packages/libagent/device/onlykey.py", line 42, in connect
self.ok.set_time(time.time())
File "/home/pino/.local/lib/python3.10/site-packages/onlykey/client.py", line 217, in set_time
logging.debug('Setting current epoch time =', current_epoch_time)
Message: 'Setting current epoch time ='
Arguments: ('622a39d1',)
--- Logging error ---
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/init.py", line 1100, in emit
msg = self.format(record)
File "/usr/lib/python3.10/logging/init.py", line 943, in format
return fmt.format(record)
File "/usr/lib/python3.10/logging/init.py", line 678, in format
record.message = record.getMessage()
File "/usr/lib/python3.10/logging/init.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/home/pino/.local/bin/onlykey-agent", line 8, in
sys.exit(ssh_agent())
File "/home/pino/.local/bin/onlykey_agent.py", line 5, in
ssh_agent = lambda: libagent.ssh.main(DeviceType)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 185, in wrapper
return func(*args, **kwargs)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 301, in main
command = ['ssh'] + ssh_args(conn) + args.command
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 30, in ssh_args
pubkey_tempfile, = conn.public_keys_as_files()
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 235, in public_keys_as_files
for pk in self.public_keys():
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/init.py", line 221, in public_keys
self.public_keys_cache = conn.export_public_keys(self.identities)
File "/home/pino/.local/lib/python3.10/site-packages/libagent/ssh/client.py", line 24, in export_public_keys
with self.device:
File "/home/pino/.local/lib/python3.10/site-packages/libagent/device/interface.py", line 126, in enter
self.conn = self.connect()
File "/home/pino/.local/lib/python3.10/site-packages/libagent/device/onlykey.py", line 42, in connect
self.ok.set_time(time.time())
File "/home/pino/.local/lib/python3.10/site-packages/onlykey/client.py", line 220, in set_time
logging.debug('SENDING OKSETTIME:', [x for x in enumerate(payload)])
Message: 'SENDING OKSETTIME:'
Arguments: ([(0, 98), (1, 42), (2, 57), (3, 209)],)
2022-03-10 18:48:01,258 DEBUG preparing payload for writing [client.py:225]
2022-03-10 18:48:01,258 DEBUG msg=OKSETTIME [client.py:231]
2022-03-10 18:48:01,258 DEBUG payload=[98, 42, 57, 209] [client.py:253]
2022-03-10 18:48:01,258 DEBUG sending message [client.py:266]
2022-03-10 18:48:01,261 DEBUG read="UNLOCKEDv2.1.2-prodc" [client.py:323]
2022-03-10 18:48:01,261 DEBUG outstring="bytearray(b'UNLOCKEDv2.1.2-prodc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')" [client.py:325]
2022-03-10 18:48:01,261 INFO Requesting public key from key slot =132 [onlykey.py:132]
2022-03-10 18:48:01,261 DEBUG identity parts: ['ssh://', 'pino@', '10.1.1.104', ':55511'] [interface.py:46]
2022-03-10 18:48:01,261 DEBUG "ssh://pino@10.1.1.104:55511|ed25519" getting public key (ed25519) from OnlyKey [onlykey.py:134]
2022-03-10 18:48:01,261 INFO Identity to hash =b'pino@10.1.1.104' [onlykey.py:146]
2022-03-10 18:48:01,261 INFO Identity hash =xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [onlykey.py:150]
2022-03-10 18:48:01,261 DEBUG preparing payload for writing [client.py:225]
2022-03-10 18:48:01,261 DEBUG msg=OKGETPUBKEY [client.py:231]
2022-03-10 18:48:01,261 DEBUG slot_id=132 [client.py:236]
2022-03-10 18:48:01,261 DEBUG payload="0103d66832f389527ff7e97a0e2bdce69d8c6f8945f32b0e45e62b8005daaca173" [client.py:247]
2022-03-10 18:48:01,261 DEBUG sending message [client.py:266]
2022-03-10 18:48:01,262 INFO curve name= 'ed25519' [onlykey.py:166]
2022-03-10 18:48:01,362 DEBUG read="" [client.py:323]
2022-03-10 18:48:01,362 DEBUG outstring="bytearray(b'')" [client.py:325]
2022-03-10 18:48:01,462 DEBUG read="" [client.py:323]
2022-03-10 18:48:01,462 DEBUG outstring="bytearray(b'')" [client.py:325]
2022-03-10 18:48:01,563 DEBUG read="" [client.py:323]
2022-03-10 18:48:01,563 DEBUG outstring="bytearray(b'')" [client.py:325]
<¹{%´I-10 18:48:01,592 DEBUG read="juçºÏ;&\K
«®ß»ðKü" [client.py:323]
2022-03-10 18:48:01,592 DEBUG outstring="bytearray(b'ju\xe7\xba\xcf;&\K\r\x87\x12<\x87
\xb9{%\xb4\x99I\x92\x0b\xab\x18\xae\xdf\xbb\xf0K\x0f\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')" [client.py:325]
2022-03-10 18:48:01,592 INFO received= [106, 117, 231, 186, 207, 59, 38, 92, 75, 13, 135, 18, 60, 134, 42, 185, 123, 36, 180, 153, 73, 146, 11, 171, 24, 174, 223, 187, 240, 75, 15, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] [onlykey.py:177]
2022-03-10 18:48:01,592 INFO Received Public Key generated by OnlyKey= 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' [onlykey.py:185]
2022-03-10 18:48:01,592 INFO vk= <nacl.signing.VerifyKey object at 0x7f9d865d3fa0> [onlykey.py:188]
2022-03-10 18:48:01,592 DEBUG identity parts: ['ssh://', 'pino@', '10.1.1.104', ':55511'] [interface.py:46]
2022-03-10 18:48:01,592 DEBUG fingerprint: 45:50:1b:10:5a:ce:5a:bc:3e:ac:f9:ab:d8:ab:47:a2 [formats.py:233]
2022-03-10 18:48:01,592 INFO disconnected from OnlyKey [onlykey.py:115]
2022-03-10 18:48:01,613 DEBUG local SSH version: b'OpenSSH_8.9p1, OpenSSL 1.1.1m 14 Dec 2021\n' [init.py:144]
2022-03-10 18:48:01,613 DEBUG serving on /tmp/trezor-ssh-agent-wc8t6f73 [server.py:30]
2022-03-10 18:48:01,614 DEBUG server thread started [server.py:121]
2022-03-10 18:48:01,614 INFO running ['ssh', '-p', '55511', '-l', 'pino', '-o', 'IdentityFile=/tmp/trezor-ssh-pubkey-fgu2135i', '-o', 'IdentitiesOnly=true', '10.1.1.104'] with {'SSH_AUTH_SOCK': '/tmp/trezor-ssh-agent-wc8t6f73', 'SSH_AGENT_PID': '6469'} [server.py:156]
2022-03-10 18:48:01,614 DEBUG waiting for connection on /tmp/trezor-ssh-agent-wc8t6f73 [server.py:129]
2022-03-10 18:48:01,615 DEBUG subprocess 6479 is running [server.py:163]
2022-03-10 18:48:01,680 DEBUG welcome agent [server.py:90]
2022-03-10 18:48:01,680 DEBUG waiting for connection on /tmp/trezor-ssh-agent-wc8t6f73 [server.py:129]
2022-03-10 18:48:01,681 DEBUG request: 208 bytes [protocol.py:94]
2022-03-10 18:48:01,681 WARNING error: 27 [server.py:100]
Traceback (most recent call last):
File "/home/pino/.local/lib/python3.10/site-packages/libagent/server.py", line 95, in handle_connection
reply = handler.handle(msg=msg)
File "/home/pino/.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/pino/.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-fgu2135i": invalid format
pino@10.1.1.104: Permission denied (publickey).
2022-03-10 18:48:01,696 DEBUG subprocess 6479 exited: 255 [server.py:165]
2022-03-10 18:48:01,696 DEBUG closing server [init.py:160]
2022-03-10 18:48:01,781 DEBUG server stopped [server.py:133]
2022-03-10 18:48:01,781 DEBUG server thread stopped [server.py:138]

I have the same python version 3.10.2.
I have installed onlykey-agent with pipx and it always work till 10 days ago, but to try i have uninstall it and install again with the normal pip3, and it game me the same exact error.

@onlykey Apologies for the delay - here's the debugging output requested:

mine on  master [$?⇡] 
at 14:05:29 ζ  onlykey-agent git@github.com -vvv -c                             

2022-03-13 14:05:38,841 DEBUG        Setting skey slot = 132                                                                              [onlykey.py:56]
2022-03-13 14:05:38,841 DEBUG        parsed identity: {'proto': None, 'user': 'git', 'host': 'github.com', 'port': None, 'path': None}    [interface.py:30]
2022-03-13 14:05:38,841 DEBUG        identity parts: ['ssh://', 'git@', 'github.com']                                                     [interface.py:46]
2022-03-13 14:05:38,841 INFO         identity #0: <ssh://git@github.com|ed25519>                                                          [__init__.py:287]
2022-03-13 14:05:38,867 DEBUG        connected                                                                                            [client.py:170]
--- Logging error ---
Traceback (most recent call last):
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 1098, in emit
    msg = self.format(record)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 942, in format
    return fmt.format(record)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/home/odysseus/.pyenv/versions/3.10.0/bin/onlykey-agent", line 8, in <module>
    sys.exit(ssh_agent())
  File "/home/odysseus/.pyenv/versions/3.10.0/bin/onlykey_agent.py", line 5, in <lambda>
    ssh_agent = lambda: libagent.ssh.main(DeviceType)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 185, in wrapper
    return func(*args, **kwargs)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 301, in main
    command = ['ssh'] + ssh_args(conn) + args.command
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 30, in ssh_args
    pubkey_tempfile, = conn.public_keys_as_files()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 235, in public_keys_as_files
    for pk in self.public_keys():
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 221, in public_keys
    self.public_keys_cache = conn.export_public_keys(self.identities)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/client.py", line 24, in export_public_keys
    with self.device:
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/device/interface.py", line 126, in __enter__
    self.conn = self.connect()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/device/onlykey.py", line 42, in connect
    self.ok.set_time(time.time())
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/onlykey/client.py", line 217, in set_time
    logging.debug('Setting current epoch time =', current_epoch_time)
Message: 'Setting current epoch time ='
Arguments: ('622dfa32',)
--- Logging error ---
Traceback (most recent call last):
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 1098, in emit
    msg = self.format(record)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 942, in format
    return fmt.format(record)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "/home/odysseus/.pyenv/versions/3.10.0/bin/onlykey-agent", line 8, in <module>
    sys.exit(ssh_agent())
  File "/home/odysseus/.pyenv/versions/3.10.0/bin/onlykey_agent.py", line 5, in <lambda>
    ssh_agent = lambda: libagent.ssh.main(DeviceType)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 185, in wrapper
    return func(*args, **kwargs)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 301, in main
    command = ['ssh'] + ssh_args(conn) + args.command
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 30, in ssh_args
    pubkey_tempfile, = conn.public_keys_as_files()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 235, in public_keys_as_files
    for pk in self.public_keys():
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/__init__.py", line 221, in public_keys
    self.public_keys_cache = conn.export_public_keys(self.identities)
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/ssh/client.py", line 24, in export_public_keys
    with self.device:
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/device/interface.py", line 126, in __enter__
    self.conn = self.connect()
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/libagent/device/onlykey.py", line 42, in connect
    self.ok.set_time(time.time())
  File "/home/odysseus/.pyenv/versions/3.10.0/lib/python3.10/site-packages/onlykey/client.py", line 220, in set_time
    logging.debug('SENDING OKSETTIME:', [x for x in enumerate(payload)])
Message: 'SENDING OKSETTIME:'
Arguments: ([(0, 98), (1, 45), (2, 250), (3, 50)],)
2022-03-13 14:05:38,868 DEBUG        preparing payload for writing                                                                        [client.py:225]
2022-03-13 14:05:38,868 DEBUG        msg=OKSETTIME                                                                                        [client.py:231]
2022-03-13 14:05:38,868 DEBUG        payload=[98, 45, 250, 50]                                                                            [client.py:253]
2022-03-13 14:05:38,869 DEBUG        sending message                                                                                      [client.py:266]
2022-03-13 14:05:38,903 DEBUG        read="UNLOCKEDv2.1.2-prodc"                              [client.py:323]
2022-03-13 14:05:38,903 DEBUG        outstring="bytearray(b'UNLOCKEDv2.1.2-prodc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')" [client.py:325]
2022-03-13 14:05:38,903 INFO         Requesting public key from key slot =132                                                             [onlykey.py:132]
2022-03-13 14:05:38,903 DEBUG        identity parts: ['ssh://', 'git@', 'github.com']                                                     [interface.py:46]
2022-03-13 14:05:38,903 DEBUG        "<ssh://git@github.com|ed25519>" getting public key (ed25519) from OnlyKey                           [onlykey.py:134]
2022-03-13 14:05:38,903 INFO         Identity to hash =b'git@github.com'                                                                  [onlykey.py:146]
2022-03-13 14:05:38,904 INFO         Identity hash =3de132cd98be7bf26b6f08e81c31c799a891bc32046b61f0b6fe3671ca2e44b5                      [onlykey.py:150]
2022-03-13 14:05:38,904 DEBUG        preparing payload for writing                                                                        [client.py:225]
2022-03-13 14:05:38,904 DEBUG        msg=OKGETPUBKEY                                                                                      [client.py:231]
2022-03-13 14:05:38,904 DEBUG        slot_id=132                                                                                          [client.py:236]
2022-03-13 14:05:38,904 DEBUG        payload="013de132cd98be7bf26b6f08e81c31c799a891bc32046b61f0b6fe3671ca2e44b5"                         [client.py:247]
2022-03-13 14:05:38,904 DEBUG        sending message                                                                                      [client.py:266]
2022-03-13 14:05:38,905 INFO         curve name= 'ed25519'                                                                                [onlykey.py:166]
2022-03-13 14:05:39,005 DEBUG        read=""                                                                                              [client.py:323]
2022-03-13 14:05:39,005 DEBUG        outstring="bytearray(b'')"                                                                           [client.py:325]
2022-03-13 14:05:39,105 DEBUG        read=""                                                                                              [client.py:323]
2022-03-13 14:05:39,106 DEBUG        outstring="bytearray(b'')"                                                                           [client.py:325]
2022-03-13 14:05:39,206 DEBUG        read=""                                                                                              [client.py:323]
2022-03-13 14:05:39,206 DEBUG        outstring="bytearray(b'')"                                                                           [client.py:325]

I can confirm the exact same issue as described and started digging a little bit.
Considering the return code from ssh (27) which is unhandled by lib-agent, this is presumably not an issue with python3.10 but related to a newer version of openssh, I believe: https://github.com/openssh/openssh-portable/blob/master/PROTOCOL.agent

Apparently the agent protocol has been introduced 3 months ago.

@jenszo Thanks for that. I was able to reproduce issue, the issue is when you have the 14 Dec 2021 release of Openssh.

Yes, i confirm the problem is the version 8.9p1-1, i have solved the problem by downgrade to the version openssh-8.8p1-1
by the means of the utility downgrade with following command:
sudo downgrade openssh and choose the 8.8 version.
Thanks for your help and putting me in the right direction; maybe with the next version they solve the problem.

Referencing romanz#379

mavaa commented

Hey, I don't have an onlykey, just wanted to say I tested this pull request for my Trezor, which fixes the problem with OpenSSH 8.9p1-1: romanz#384

Maybe you can do something similar here?

Yes romanz#384 should fix this issue as well.

@chrischambers @Stibax This fix was included in the latest release of onlykey-agent. Please update and let me know if this addresses issue:

$ pip3 install onlykey-agent

@onlykey Seems to have fixed things for me, thanks!

It works! I have updated again OpenSSH to the problematic 8.9 version, updated onlykey-agent. No error, ask fo the challenge and make ssh connection . Thanks!

I open a new issue because it's not the same problem.