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

Invalid status 6a80 (Unknown reason)) communicating with LedgerNanoS #458

Open
erjoalgo opened this issue Sep 27, 2023 · 1 comment
Open

Comments

@erjoalgo
Copy link

I'm unable to use legder-agent -s shell to ssh into a remote server. I get this error Invalid status 6a80 (Unknown reason)) communicating with LedgerNanoS even after being prompted and approving sending the public key.



█[my-hostname][~][0]$ ssh ocean
HID => b001000000
HID <= REDACTED
HID => REDACTED
HID <= REDACTED
2023-09-27 19:27:11,642 WARNING      unparsed blob: b'\x00\x00\x003\x00\x00\x00\x0bssh-ed25519\x00\x00\x00 A_\xca\x1ag@\x85%\xf9\xc9\xc7\x99os\xe3x\xa5o>\x8bz\xcf\x1e\x7f\x1a;2\x88\xa6+g3' [client.py:81]
2023-09-27 19:27:11,643 INFO         please confirm user "USER" login to "<ssh://USER|nist256p1>" using LedgerNanoS...            [client.py:47]
HID => b001000000
HID <= REDACTED
HID => REDACTED
HID <= 9000
HID => REDACTED
HID <= 6a80
2023-09-27 19:27:11,692 ERROR        signature with "<ssh://USER|nist256p1>" key failed                                               [protocol.py:151]
Traceback (most recent call last):
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/device/ledger.py", line 134, in sign
    result = bytearray(self.conn.exchange(bytes(apdu)))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/ledgerblue/comm.py", line 157, in exchange
    raise CommException("Invalid status %04x (%s)" % (sw, possibleCause), sw, response)
ledgerblue.commException.CommException: Exception : Invalid status 6a80 (Unknown reason)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/protocol.py", line 147, in sign_message
    signature = self.conn.sign(blob=blob, identity=key['identity'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/__init__.py", line 234, in sign
    return conn.sign_ssh_challenge(blob=blob, identity=identity)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/client.py", line 52, in sign_ssh_challenge
    return self.device.sign(blob=blob, identity=identity)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/device/ledger.py", line 136, in sign
    raise interface.DeviceError(
libagent.device.interface.DeviceError: Error (Exception : Invalid status 6a80 (Unknown reason)) communicating with LedgerNanoS
sign_and_send_pubkey: signing failed for ECDSA "<ssh://USER|nist256p1>" from agent: communication with agent failed
2023-09-27 19:27:11,695 WARNING      error: Error (Exception : Invalid status 6a80 (Unknown reason)) communicating with LedgerNanoS       [server.py:100]
Traceback (most recent call last):
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/device/ledger.py", line 134, in sign
    result = bytearray(self.conn.exchange(bytes(apdu)))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/ledgerblue/comm.py", line 157, in exchange
    raise CommException("Invalid status %04x (%s)" % (sw, possibleCause), sw, response)
ledgerblue.commException.CommException: Exception : Invalid status 6a80 (Unknown reason)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/server.py", line 95, in handle_connection
    reply = handler.handle(msg=msg)
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/protocol.py", line 106, in handle
    reply = method(buf=buf)
            ^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/protocol.py", line 147, in sign_message
    signature = self.conn.sign(blob=blob, identity=key['identity'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/__init__.py", line 234, in sign
    return conn.sign_ssh_challenge(blob=blob, identity=identity)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/ssh/client.py", line 52, in sign_ssh_challenge
    return self.device.sign(blob=blob, identity=identity)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/USER/.local/lib/python3.11/site-packages/libagent/device/ledger.py", line 136, in sign
    raise interface.DeviceError(
libagent.device.interface.DeviceError: Error (Exception : Invalid status 6a80 (Unknown reason)) communicating with LedgerNanoS
user@example.com.216.157: Permission denied (publickey).
█[my-hostname][~][255]$ ledger-agent --help
[group-1] 0:USER*                                                                                                                 
@Rorschach45
Copy link

same issue here

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

2 participants