Question

SSH through IPv6 times out

I first noticed the problem that whenever I would try to ssh into my droplet using the domain name, it would take about two minutes. When I used ssh -vvv, I found that it was the IPv6 causing the problem-- It would time out when trying the IPv6 address, then fall to the IPv4 and work fine–

debug1: Connecting to example.com [****:****:***:**::****:8001] port 22.
debug1: connect to address ****:****:***:**::****:**** port 22: Connection timed out
debug1: Connecting to example.com [***.***.**.240] port 22.
debug1: Connection established.

(I generalized the message. It’s not exactly a secret site, though.)

And when I try to connect using only the IPv6 address instead of the domain, it fails. (Works fine with IPv4 address.)

I went through the DO SSH troubleshooting article, but it didn’t make any difference. Where can I go to try to troubleshoot this?

(If it’s relevant, I’m using nginx on this server. I have another server that uses nginx, but it doesn’t have this problem.)


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I am posting here because it looks like I may have the same problem as the original question.

My droplet suddenly stopped accepting IPv6 connections. The OS on this droplet (Debian 9) has over 270 days of continuous uptime and has never had problems with IPv6 connections in the past. What could have changed?

I can’t ssh into the server and can’t ping it, over IPv6. But if I force IPv4, I have no problem connecting.

I have made no configuration changes over the past few days, and my DNS records appear to be set up correctly (I also haven’t changed them in a while).

I know this is old, but I’ve spent the better part of 4 days trying to figure out why none of my three Fedora instances would connect over ipv6. It would try to connect, get ‘no route to host’ and then fail over to IPV4. Which is fine, it just caused the connection step to hang a bit.

For whatever reason, if I copied /etc/sysconfig/network-scripts/ifcfg-eth0* to home and then deleted them, rebooted, and then copied them back and rebooted again, everything would work again.

I can’t explain it, but hope it helps someone. I suspect that something got them all out of sync and then the reboot with no connection “reset” whatever was wrong and then it works.

Well, I’m at the point now where I just need to destroy the droplet and restart. I can no longer SSH at all anymore, and I can’t log in through the console, either. Thanks for the help, though.