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

I'm a dummy who can't read - Could you make it clearer that ssh-ident needs both private and public keys? #60

Open
Makeshift opened this issue Aug 22, 2020 · 1 comment

Comments

@Makeshift
Copy link

I fully admit that I'm just stupid and glazed over the part of the docs that said that.

After much debugging (see: adding print statements because I was too lazy to open an IDE), I realised that ssh-ident was identifying that my priv key existed (yay!) but skipping over it in FindUnloadedKeys because it didn't have an accompanying .pub (boo!). I then searched the readme for "public key" and immediately found the line telling me I needed both. Oops.

I was just curious why it requires a public key. From what I can tell it's simply used as a quick check to see which keys are loaded in ssh-add -l, in which case, couldn't ssh-keygen -l -f be used upon load of a priv key if a corresponding pub couldn't be found? I'm not sure if I'm an uncommon case, not storing my priv/pub keys in id_rsa and id_rsa.pub in the same folder, but until I found ssh-ident I had quite a lot of keys in the same folder with different names.

It also may be worth updating this line in the docs:

Note that ssh-ident needs to access both your private and public keys. Note
also that it identifies public keys by the .pub extension. All files in your
identities subdirectories will be considered keys.

as it isn't entirely accurate, being that PATTERN_KEYS has a fairly strict regex on what should be considered keys.

Anyway, aside from me being dumb, excellent tool! Now I've got it set up, it works like a charm.

@maddes-b
Copy link

maddes-b commented Jan 9, 2022

Can you have a look at the fork at https://github.com/ssh-ident/ssh-ident1 if the updated passage fits your expectations.

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