SSH fails with connection timed out - in VPN and hangs here "expecting SSH2_MSG_KEX_ECDH_REPLY" + Ubuntu 16.04.6 LTS
Solution 1:
Setting MTU to 1200 solved it for me (Ubuntu 20.04).
with (replace {dev}):
sudo ip li set mtu 1200 dev {dev}
Solution 2:
The root cause of the issue is with the openconnect VPN client package, MTU handling fail to negotiate. Bug -> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1874257
Solution 3:
As a temporary workaround, setting the KEX algorithm manually solves this problem for me.
Add KexAlgorithms ecdh-sha2-nistp521
to the corresponding SSH config, or add -oKexAlgorithms=ecdh-sha2-nistp521
to the command line args for one time use.
Reference (2019): https://superuser.com/a/1462220/555702