-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Description
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:
- Add more than six keys to your ssh-agent
- Make sure the one used for lagoon is "last" in the list
- Try to ssh into a lagoon environment
- 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
-iflag
- Or use the existing
Metadata
Metadata
Assignees
Labels
No labels