-
Notifications
You must be signed in to change notification settings - Fork 35
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 ordering of keys #301
Comments
doc on how keys are ordered currently would be helpful. my use case is KeeAgent with a bunch of keys and servers that have a low MaxAuthTries: the server errors on MaxAuthTries before KeeAgent gets to the correct key. If I knew how to affect key order then I could avoid this problem for most of the servers I work with by placing their keys first in KeeAgent order and placing keys for servers with larger MaxAuthTries last. |
@tlynchpin I was able to figure out a way to control order Still it would be nice if the docs were more explicit or there was some obvious controls somewhere. |
Keys are ordered in the natural order of the entries. Use 'Rearrange' to change the location of entries that have keys, this changes the order of the keys in KeeAgent. |
You can also use the .ssh/config file to set the key that should be used for each host, using the public key
You can even use multiple IdentityFile entries to select various keys in order |
+1 |
Where do i find this 'Rearrange'? |
Sorry to necro, but this is indeed a much desired feature. In case where 6 or more keypairs loaded in KeeAgent, PubkeyAuthentication will often fail, making ssh fallback to Password auth. When in usages where non-interactive ssh is used, this causes the ssh process to fail (with a non-obvious "Too many authentication failures"), or even get stuck midway asking password. Therefore a method to specifiy the priority of which keypair to try first will greatly improve the ease of use |
There are already two ways to do this: 1. Ordering keys in KeePassLoaded keys will be ordered in the natural order on Keepass (respecting group and key order). Keys inside a group can be reordered using the Rearrange context menu option: Ensure the list of entries is not sorted by any field to see the entries in natural order: Click in the Title header, to sort again by title but in descending order: Click again to remove the sort order: 2. Ordering keys in SSH configFirst, export the PUBLIC keys to files in your computer, for example, in For each host you connect to, add the following content:
When you run Reference: https://linux.die.net/man/5/ssh_config |
For putting public keys to
which seems to me is a private key. And cross-referencing
Therefore, from the manpage text, I don't suppose the Last (and least), some personal opinionI personally don't think KeeAgent as a plugin is "good" to dedicate the ordering for entries for its functionality. And unnecessarily leave keys (albeit only the public part) in the filesystem doesn't sound good to me. |
It works as long as you have the corresponding privake key loaded into the agent (KeeAgent in this case). Once the agent is not running (locked database?), ssh will fail because of the file being of "incorrect format".
Security-wise, it should not be a risk. But yeah, it just doesn't feel right. I would have prefered having some ssh_config option to specify the fingerprint of the key. But right now is some historical functionality from SSH. |
I have generated and I want to start using a new keypair, I also have a couple old keys that I want to keep available for systems I haven't updated yet, but only use them as needed
I want to be able to have my new key set to allow connections without out any constraints or confirmations, and my old keys ask for me to confirm their usage.
I want the
zoredache-20200616
to be loaded and used first.I know if I set
zoredache-20200616
to only load at startup, and then manually addzoredache-20180109
keeagent seems works the way I want it to work, so mostly I just am l just wondering if there is a way to control the order keys are automatically loaded and added to the agent. Or if a method could be added.The text was updated successfully, but these errors were encountered: