https://bbs.archlinux.org/viewtopic.php?id=270724
I had an issue where my SSH terminal was freezing in a Ubuntu 22.04.3 LTS.
I would do a command with small output and it would return but when using larger commands or sudo it would hang.
I have a funky networking (VXLAN over Zerotier) setup for this VM so I thought that this might be the cause of the terminal freeze.
But in the end I think it was a hostname didn't match what was in /etc/hosts
Fix
# get the hostname
hostname
TGN-SRV-VM01
# fix
sudo vim /etc/hosts
Contents of /etc/hosts
# contents of /etc/hosts
127.0.0.1 localhost
# remove incorrect hostname and replace it with the correct one
# 127.0.1.1 tmp-srv-01
127.0.1.1 TGN-SRV-VM01
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
0 Comments