aws / aws/aws-elastic-beanstalk-cli

Ssh command fails when ssh agent try many identity files

Open
#144 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
181
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### Description

The`eb ssh` command attaches the identity file related to your EB instance, however ssh client not only offer the identity file specified with ssh param `-i` but also all other identity files that ssh agent has access on your machine. It causes a rejection with message "Too many authentication failures", when ssh agent presents to aws instance those identify files before the one ssh command specify with the param `-i`

### Steps to reproduce

This can be reproduced by issuing a ssh command to your EB instance with more than 6 identify files in your ~/.ssh folder

### Observed result
A rejection message : "Too many authentication failures" as below:

```
INFO: Running ssh -i file.pem ec2-user@--.--.--.--
Received disconnect from --.--.--.-- port 22:2: Too many authentication failures
Disconnected from --.--.--.-- port 22
```

### Expected result

A successful ssh terminal prompt into EB instance

### Additional environment details

1. OS: Linux
2. EBCLI version: 3.20.3

Contributor guide

Open the contributing guide

Research direction

Start with the implementation of the `eb ssh` command and reproduce the failure using more than six identity files in `~/.ssh` on Linux. Trace how the command invokes SSH, then verify that the command reaches a successful terminal prompt without the “Too many authentication failures” message.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.