SSH IPv6 stopped working

0

Hello, On July 9th, the AWS console became unstable and since then we have been unable to connect to our instances via SSH IPv6. Is there a problem with the AWS network? Because we suddenly lost access through SSH. We need to connect to our instances.

Below is an example of the feedback we received when making a connection attempt:

ssh -i key.pem ubuntu@[ec2_ipv6_address]

ssh: connect to host 2600:1f16:159e:8a00:5e19:c15d:366d:57b8 port 22: Connection timed out

I am using Windows Power Shell

asked a month ago155 views
4 Answers
4
Accepted Answer
  1. Validate that your workstation has a valid IPv6 address.
  2. Validate that you can reach the internet over IPv6. Sites like https://ifconfig.me or https://ifconfig.co can help with this and they will show the address that you are connecting from.
  3. Check the Security Group on your instance and ensure that you are allowing SSH (tcp/22) from the IPv6 address.

I will note, that I am able to connect to port 22 of the IP that you provided. This does mean your EC2 instance is running and accepting connections. Be aware however, that it is not wise to leave SSH open to the world (i.e. ::/0). You should consider limiting this to only addresses that you want to connect to your instance.

Hope this helps.

profile pictureAWS
EXPERT
iBehr
answered a month ago
profile picture
EXPERT
Sandeep
reviewed a month ago
profile picture
EXPERT
reviewed a month ago
EXPERT
reviewed a month ago
  • I took all the tests and they all passed. I can open websites with IPv6 and my local computer has an IPv6 assigned (checked on the website you suggested). I validated all the steps with the suggested documentation and everything is correct. However, I still have no SSH connection to the instance.

2

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html

To connect to your instance using an IPv6 address, check the following:

Your subnet must be associated with a route table that has a route for IPv6 traffic (::/0) to an internet gateway.

Your security group rules must allow inbound traffic from your local IPv6 address on the proper port (22 for Linux and 
3389 for Windows).

Your network ACL rules must allow inbound and outbound IPv6 traffic.

If you launched your instance from an older AMI, it might not be configured for DHCPv6 (IPv6 addresses are not automatically recognized on the network interface). For more information, see Configure IPv6 on your instances in the Amazon VPC User Guide.

Your local computer must have an IPv6 address, and must be configured to use IPv6.

and you can use this guide to check instance health https://repost.aws/knowledge-center/ec2-linux-ssh-troubleshooting

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
Artem
reviewed 21 days ago
profile picture
EXPERT
reviewed a month ago
0

Thanks for the answers. Everything was working until last Monday. I redid the tests as suggested in the answers and everything seems fine. I just can't connect with SSH anymore. I added the SSH open to world (::/0) rule just to make sure I could connect normally again, but it didn't work.

answered a month ago
  • Since iBehr in this discussion mentioned they were able to connect to your server over SSH and IPv6, it strongly suggests that it's your local network provider who has problems with IPv6. I've seen those intermittently with some ISPs still practising IPv6 routing, where some routes have been reachable and others haven't. It can be quite tricky to diagnose this, but if you have a different network connection available over IPv6, such as with your mobile phone's connection shared over WiFi to your laptop, perhaps you could test if the mobile connection works and your other connection not?

  • Access is now closed but at the time was open.

    > ssh 2600:1f16:159e:8a00:5e19:c15d:366d:57b8
    Warning: Permanently added '2600:1f16:159e:8a00:5e19:c15d:366d:57b8' (ED25519) to the list of known hosts.
    ibehr@2600:1f16:159e:8a00:5e19:c15d:366d:57b8: Permission denied (publickey).
    
    ❯ nc -zv 2600:1f16:159e:8a00:5e19:c15d:366d:57b8 22
    Connection to 2600:1f16:159e:8a00:5e19:c15d:366d:57b8 port 22 [tcp/ssh] succeeded!
    
  • iBehr, I still don't have access.

    ssh: connect to host 2600:1f16:159e:8a00:5e19:c15d:366d:57b8 port 22: Connection timed out
    
  • When you visit either of the ifconfig sites, does it show you are connected from an IPv4 or IPv6 address? Perhaps run the below from a bash session on your workstation.

    curl https://ifconfig.co

    Can you share the IPv6 address of your workstation?

    Next, can you share the IPv6 entries from the Security Group you have on your instance?

  • iBehr, The problem was my internet provider. They corrected the configuration and now everything is back to normal. Thanks!

0

By the instability, do you mean that the AWS management console is also no longer working at all or reliably when accessed over IPv6 from your on-premises location? Or the console issue was transient?

EXPERT
Leo K
answered a month ago
  • The problem was temporary, it lasted a few hours and I really can't say if it has anything to do with SSH IPv6. But I thought it was too much of a coincidence