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

Using in practice #2

Open
nderjung opened this issue Jul 14, 2017 · 1 comment
Open

Using in practice #2

nderjung opened this issue Jul 14, 2017 · 1 comment

Comments

@nderjung
Copy link

I've installed this via pip and attempted your example, however:

lokey fetch keybase twitter:jf | lokey to ssh

Yields the following:

Traceback (most recent call last):
  File "/usr/local/bin/lokey", line 11, in <module>
    load_entry_point('lokey==0.5.0', 'console_scripts', 'lokey')()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/lokey/__init__.py", line 119, in ssh
    print(ctx.obj.key.to('ssh', comment=comment))
  File "/usr/local/lib/python2.7/dist-packages/eris/__init__.py", line 44, in to
    return transmuter.serialize(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/eris/__init__.py", line 159, in serialize
    encoding=serialization.Encoding.OpenSSH,
  File "/usr/local/lib/python2.7/dist-packages/enum/__init__.py", line 390, in __getattr__
    raise AttributeError(name)
AttributeError: OpenSSH

My second concern is attempting to use ssh once the user has had their key authorised. What mechanism is used to convert the keybase public key, or their gpg key in general, to a private ssh key? What is the pipeline from keybase to ssh?

@jpf
Copy link
Owner

jpf commented Sep 12, 2017

Sorry for taking so long to reply. I'm not sure what's causing your error but my guess would be that it's related to getting openssl or the Cryptography package working.

As to your second concern: Assuming that you pasted the user's public key into their authorized_keys file, that user would need to convert their (in this case) keybase key into the SSH format before they attempted to log in to your server. This would probably look something like gpg --armor --export-secret-keys user@example.com | lokey to ssh > ~/.ssh/from-pgp (if this doesn't work, I should fix lokey so it does!)

Once they've done that, then I would do something like ssh -i ~/.ssh/from-pgp username@yourhost.example.com – at least this is one of the use cases I imagined for people, not sure if that's what people would want to do.

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