rsp icon indicating copy to clipboard operation
rsp copied to clipboard

Passphrase must be specified to import encrypted private keys

Open phene opened this issue 4 years ago • 0 comments

Any idea why this would happen when running rsp-trust?

$ rsp-trust my-host my-port
Traceback (most recent call last):
  File "/usr/local/bin/rsp-trust", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/rsp/trust.py", line 47, in main
    hostkey = loop.run_until_complete(
  File "/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/asyncssh/connection.py", line 6872, in get_server_host_key
    options = SSHClientConnectionOptions(
  File "/usr/local/lib/python3.9/site-packages/asyncssh/connection.py", line 5384, in __init__
    super().__init__(options=options, last_config=last_config, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/misc.py", line 268, in __init__
    self.prepare(**self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/connection.py", line 5955, in prepare
    self.client_keys = load_keypairs(client_keys, passphrase,
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 3159, in load_keypairs
    key, certs = read_private_key_and_certs(key, passphrase)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 2977, in read_private_key_and_certs
    key, cert = import_private_key_and_certs(read_file(filename), passphrase)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 2867, in import_private_key_and_certs
    key, end = _decode_private(data, passphrase)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 2527, in _decode_private
    key = _decode_pem_private(pem_name, headers, data, passphrase)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 2441, in _decode_pem_private
    return _decode_openssh_private(data, passphrase)
  File "/usr/local/lib/python3.9/site-packages/asyncssh/public_key.py", line 2284, in _decode_openssh_private
    raise KeyImportError('Passphrase must be specified to import '
asyncssh.public_key.KeyImportError: Passphrase must be specified to import encrypted private keys

phene avatar Mar 30 '21 06:03 phene