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

Not able to specify a specific ssh key from ssh-agent #354

Closed
rocketeerbkw opened this issue Jun 13, 2024 · 1 comment · Fixed by #355
Closed

Not able to specify a specific ssh key from ssh-agent #354

rocketeerbkw opened this issue Jun 13, 2024 · 1 comment · Fixed by #355

Comments

@rocketeerbkw
Copy link
Member

Describe the bug
The golang SSH handling in the cli will iterate over all of the keys in the system ssh-agent, but the order of the keys is non-deterministic. In the case where a user has more than six SSH keys, it's possible that the correct one is at the end of the list and the max auth attempts is exceeded.

The error is error: maximum authentication attempts exceeded.

To Reproduce
Steps to reproduce the behavior:

  1. Add more than six keys to your ssh-agent
  2. Make sure the one used for lagoon is "last" in the list
  3. Try to ssh into a lagoon environment
  4. See error

Expected behavior
I can have as many SSH keys as I want, and I can use an ssh-agent to manage my passphrase settings.

Additional context
More discussion and background in uselagoon/lagoon#3739.

Some ideas to fix in the cli are:

  • Use a go library to parse ~/.ssh/config
  • Add another config option to select a specific key from the ssh-agent
    • Or use the existing -i flag
@shreddedbacon
Copy link
Member

I've got a POC for this that sort of works, but it will require some changes to configuration which is a bit annoying

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

Successfully merging a pull request may close this issue.

2 participants