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

Defer loading keys until they're needed #644

Open
goblin opened this issue Mar 28, 2024 · 1 comment
Open

Defer loading keys until they're needed #644

goblin opened this issue Mar 28, 2024 · 1 comment

Comments

@goblin
Copy link

goblin commented Mar 28, 2024

It would be nice if, when using SSHClient with callbacks/awaitables provided for the passphrase:

  1. the callback asking for a passphrase to an unencrypted key wasn't ever called,
  2. the callbacks asking for a passphrase for keys that won't be used when connecting to a host that doesn't need them or rejects them weren't called,
  3. (perhaps) the passphrase callback would be called again up to 3x (or a configurable number) if the passphrase wasn't correct.

This might require loading the .pub files which contain public keys and presenting them to the server to check if they get accepted.

I understand this is a rather big change, and might require some deeper changes. It's not urgent at all for me, the new callback/awaitable support for passphrases is really great. Leaving this in case you'd like to address this in the future, as discussed on #426.

@ronf
Copy link
Owner

ronf commented Mar 29, 2024

Thanks for filing this! I'll keep this in mind in future work on SSH key objects.

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