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

Allow SSH Public Keys to be stored on machine. #115

Closed
DomBlack opened this issue May 8, 2017 · 7 comments
Closed

Allow SSH Public Keys to be stored on machine. #115

DomBlack opened this issue May 8, 2017 · 7 comments
Assignees

Comments

@DomBlack
Copy link

DomBlack commented May 8, 2017

This is sort of an extension to #110 and #76

I am using a Ledger Nano S, with 1 keypair per SSH host I connect to. I'm using the sub-shell whenever I want to use git,ssh or scp. Pointing it at a file containing all my public keys;

ledger-agent -v -s ~dom/.ssh/ledger.conf

The problem is on the first command I issue, all public keys are fetched from the Ledger, forcing me to allow it to provide the public key multiple times.

I'm worried that I'll get used to hitting yes, and accidentally hit yes on a connection I'm not expecting.

One solution to this would be to allow me to store the actual public key in the ledger.conf file along side the generation string, meaning the agent can just read them rather than requesting them from device each time I try and use anything.

Related: LedgerHQ/app-ssh-agent#10

@romanz romanz self-assigned this May 8, 2017
@romanz
Copy link
Owner

romanz commented May 8, 2017

Sounds great!
Thanks for the suggestion :)

@romanz
Copy link
Owner

romanz commented May 12, 2017

BTW, following 26d7dd3 the agent will cache all SSH keys during its run - so you can also use the following trick to "split" public key retrieval from actual signature:

$ trezor-agent /path/to/config -s
$ ssh-add -L     # will retrieve public keys from the device (and cache them)
$ ssh user@host  # will sign the challenge (reusing the public keys cached before)

What do you think?

@DomBlack
Copy link
Author

That would work, however I'd still be worried about something sneaking into the "allow" loop.

Given enough "per host" keys, even that work around would be annoying, because you could easily be talking about 25+ keys to allow to be fetched.

Where as having them on the machine permiantely, would be a one time "allow key" requirement, followed by automatic reuse every other time the trezor-agent requires the public key

@romanz
Copy link
Owner

romanz commented May 13, 2017

Please take a look :)

@romanz
Copy link
Owner

romanz commented May 13, 2017

I've released new libagent version to PyPI (so please make sure you're using the latest one).

@DomBlack
Copy link
Author

That works brilliantly, thank you for adding this feature so quickly!

@romanz
Copy link
Owner

romanz commented May 15, 2017

You're welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants