Fix fall back to IPv6 for ec2-instance-connect ssh --connection-type eice#10358
Open
leezu wants to merge 2 commits into
Open
Fix fall back to IPv6 for ec2-instance-connect ssh --connection-type eice#10358leezu wants to merge 2 commits into
leezu wants to merge 2 commits into
Conversation
When --connection-type eice is set, resolve the destination address as private IPv4 with IPv6 as a fallback, instead of unconditionally using private IPv4. Without this, instances in IPv6-only subnets fail with "Unable to find any IP address on the instance to connect to." even though the EICE itself supports IPv6 destinations.
When --instance-id is given without --private-ip-address, resolve the destination as private IPv4 with IPv6 as a fallback, instead of KeyError'ing on PrivateIpAddress for instances in IPv6-only subnets. The EICE accepts either address family. Also raise a clear ParamValidationError when the instance has no IP address at all (matching the ssh subcommand's behavior).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When --connection-type eice is set, resolve the destination address as private IPv4 with IPv6 as a fallback, instead of unconditionally using private IPv4. Without this, instances in IPv6-only subnets fail with "Unable to find any IP address on the instance to connect to." even though the EICE itself supports IPv6 destinations.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.