What could cause ssh connections over ipv4 to drop after around a minute idle. When connecting to the same server using ipv6 the connection stays alive.

If running top, or otherwise interacting with the server the connect appears to be maintained.

The error message is: packet_write_wait: Connection to xxx.xxx.xxx.xxx port 22: Broken pipe

I've tried various ServerAliveInterval and ServerAliveCountMax as well as setting TCPKeepAlive, and IPQoS throughput.

I'm not connecting through a VPN.

I've tried on multiple machines on my home network and have the same problem.

As a workaround to connect to servers without an ipv6 address I've found I can connect via another ipv6 server and the connection is maintained.

What are some additional steps to take to help identify the problem?

1 Answer 1


Turns out this is the point that contacting you ISP is recommended!

My ISP had switched to using CGNAT (to account for scarcity of IPv4) addresses. This seems to have been causing the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .