{"action":"opened","issue":{"url":"https://api.github.com/repos/romanz/trezor-agent/issues/243","repository_url":"https://api.github.com/repos/romanz/trezor-agent","labels_url":"https://api.github.com/repos/romanz/trezor-agent/issues/243/labels{/name}","comments_url":"https://api.github.com/repos/romanz/trezor-agent/issues/243/comments","events_url":"https://api.github.com/repos/romanz/trezor-agent/issues/243/events","html_url":"https://github.com/romanz/trezor-agent/issues/243","id":324716989,"number":243,"title":"Unable to unlock Trezor ; No such file or directory: 'pinentry': 'pinentry'","user":{"login":"saphirblanc","id":16269066,"avatar_url":"https://avatars1.githubusercontent.com/u/16269066?v=4","gravatar_id":"","url":"https://api.github.com/users/saphirblanc","html_url":"https://github.com/saphirblanc","followers_url":"https://api.github.com/users/saphirblanc/followers","following_url":"https://api.github.com/users/saphirblanc/following{/other_user}","gists_url":"https://api.github.com/users/saphirblanc/gists{/gist_id}","starred_url":"https://api.github.com/users/saphirblanc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saphirblanc/subscriptions","organizations_url":"https://api.github.com/users/saphirblanc/orgs","repos_url":"https://api.github.com/users/saphirblanc/repos","events_url":"https://api.github.com/users/saphirblanc/events{/privacy}","received_events_url":"https://api.github.com/users/saphirblanc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-20T15:19:15Z","updated_at":"2018-05-20T15:19:15Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI'm trying to generate an SSH key letting me access my server using my trezor. Here are the logs :\r\n\r\n```\r\n$ trezor-agent -vv root@XXX\r\n2018-05-20 17:11:49,498 DEBUG        parsed identity: {'proto': None, 'user': 'root', 'host': 'XXX', 'port': None, 'path': None} [interface.py:30]\r\n2018-05-20 17:11:49,498 DEBUG        identity parts: ['ssh://', 'root@', 'XXX']                                       [interface.py:46]\r\n2018-05-20 17:11:49,498 INFO         identity #0: <ssh://root@XXX|nist256p1>                                          [__init__.py:251]\r\n2018-05-20 17:11:49,505 WARNING      DISPLAY not defined                                                                                  [ui.py:65]\r\n2018-05-20 17:11:49,505 INFO         using [b'ttyname=/dev/ttys001'] for pinentry options                                                 [ui.py:67]\r\n2018-05-20 17:11:49,630 DEBUG        Starting new HTTP connection (1): 127.0.0.1                                                          [connectionpool.py:208]\r\n2018-05-20 17:11:49,637 DEBUG        http://127.0.0.1:21325 \"POST /enumerate HTTP/1.1\" 200 123                                            [connectionpool.py:396]\r\n2018-05-20 17:11:49,651 DEBUG        transports: [<trezorlib.transport_bridge.BridgeTransport object at 0x105b40b38>, <trezorlib.transport_hid.HidTransport object at 0x105fe4908>] [trezor.py:102]\r\n2018-05-20 17:11:49,653 DEBUG        Starting new HTTP connection (1): 127.0.0.1                                                          [connectionpool.py:208]\r\n2018-05-20 17:11:49,662 DEBUG        http://127.0.0.1:21325 \"POST /acquire/XXX/null HTTP/1.1\" 200 17 [connectionpool.py:396]\r\n2018-05-20 17:11:49,704 DEBUG        http://127.0.0.1:21325 \"POST /call/90 HTTP/1.1\" 200 1328                                             [connectionpool.py:396]\r\n2018-05-20 17:11:49,709 DEBUG        http://127.0.0.1:21325 \"POST /release/90 HTTP/1.1\" 200 17                                            [connectionpool.py:396]\r\n2018-05-20 17:11:49,709 DEBUG        connected to Trezor XXX                                                         [trezor.py:82]\r\n2018-05-20 17:11:49,710 DEBUG        label    : XXX                                                                                 [trezor.py:83]\r\n2018-05-20 17:11:49,710 DEBUG        vendor   : bitcointrezor.com                                                                         [trezor.py:84]\r\n2018-05-20 17:11:49,710 DEBUG        version  : 1.6.1                                                                                     [trezor.py:88]\r\n2018-05-20 17:11:49,710 DEBUG        revision : b'9588e8f2736b60916f51e470deb18f55112a6ebc'                                               [trezor.py:89]\r\n2018-05-20 17:11:49,729 DEBUG        http://127.0.0.1:21325 \"POST /acquire/XXX/null HTTP/1.1\" 200 17 [connectionpool.py:396]\r\n2018-05-20 17:11:49,887 DEBUG        http://127.0.0.1:21325 \"POST /call/91 HTTP/1.1\" 200 16                                               [connectionpool.py:396]\r\n2018-05-20 17:11:49,945 DEBUG        http://127.0.0.1:21325 \"POST /call/91 HTTP/1.1\" 200 1328                                             [connectionpool.py:396]\r\n2018-05-20 17:11:49,951 DEBUG        http://127.0.0.1:21325 \"POST /release/91 HTTP/1.1\" 200 17                                            [connectionpool.py:396]\r\n2018-05-20 17:11:49,951 ERROR        ping failed: [Errno 2] No such file or directory: 'pinentry': 'pinentry'                             [trezor.py:116]\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/trezor.py\", line 110, in connect\r\n    connection.ping(msg='', pin_protection=True)  # unlock PIN\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 162, in wrapped_f\r\n    ret = f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 176, in wrapped_f\r\n    ret = f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 644, in ping\r\n    return self.call(msg)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 190, in wrapped_f\r\n    return f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 235, in call\r\n    msg = handler(resp)\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/trezor.py\", line 37, in new_handler\r\n    scrambled_pin = self.ui.get_pin()\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/ui.py\", line 40, in get_pin\r\n    options=self.options_getter())\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/ui.py\", line 98, in interact\r\n    env=os.environ)\r\n  File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py\", line 709, in __init__\r\n    restore_signals, start_new_session)\r\n  File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py\", line 1344, in _execute_child\r\n    raise child_exception_type(errno_num, err_msg, err_filename)\r\nFileNotFoundError: [Errno 2] No such file or directory: 'pinentry': 'pinentry'\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/trezor-agent\", line 11, in <module>\r\n    load_entry_point('trezor-agent==0.9.2', 'console_scripts', 'trezor-agent')()\r\n  File \"/usr/local/bin/trezor_agent.py\", line 5, in <lambda>\r\n    ssh_agent = lambda: libagent.ssh.main(DeviceType)\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/ssh/__init__.py\", line 164, in wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/ssh/__init__.py\", line 287, in main\r\n    for pk in conn.public_keys():\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/ssh/__init__.py\", line 199, in public_keys\r\n    self.public_keys_cache = conn.export_public_keys(self.identities)\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/ssh/client.py\", line 24, in export_public_keys\r\n    with self.device:\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/interface.py\", line 118, in __enter__\r\n    self.conn = self.connect()\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/trezor.py\", line 110, in connect\r\n    connection.ping(msg='', pin_protection=True)  # unlock PIN\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 162, in wrapped_f\r\n    ret = f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 176, in wrapped_f\r\n    ret = f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 644, in ping\r\n    return self.call(msg)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 190, in wrapped_f\r\n    return f(*args, **kwargs)\r\n  File \"/usr/local/lib/python3.6/site-packages/trezorlib/client.py\", line 235, in call\r\n    msg = handler(resp)\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/trezor.py\", line 37, in new_handler\r\n    scrambled_pin = self.ui.get_pin()\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/ui.py\", line 40, in get_pin\r\n    options=self.options_getter())\r\n  File \"/usr/local/lib/python3.6/site-packages/libagent/device/ui.py\", line 98, in interact\r\n    env=os.environ)\r\n  File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py\", line 709, in __init__\r\n    restore_signals, start_new_session)\r\n  File \"/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py\", line 1344, in _execute_child\r\n    raise child_exception_type(errno_num, err_msg, err_filename)\r\nFileNotFoundError: [Errno 2] No such file or directory: 'pinentry': 'pinentry' \r\n```\r\n\r\nSo the pin pad is showing up for about a second and then disappears. However, if I do unlock it through trezor.io and then generate the SSH key, everything goes smoothly.\r\n\r\nAny suggestion ?\r\n\r\nThanks!"}}
{"actor":{"display_login":"saphirblanc"}}