This seems to be an IPv6 issue but you have to connect to the host system and not the containerized hosted HA. I fixed this from this thread: Unable to reach the home assistant cloud - Nabu Casa
# Change as your network requires
ssh -p 22222 [email protected]
nmcli con show
# Note down the NAMES of the connections you have and substitute with the ones in quotes
nmcli con modify "Wired connection 1" ipv6.method disabled
nmcli con modify "my-network" ipv6.method disabled