The fix
GIT_SSH_COMMAND="ssh -v -o KexAlgorithms=curve25519-sha256" git pull
How to debug
GIT_SSH_COMMAND="ssh -v" git pull
Explanation
A hang at expecting SSH2_MSG_KEX_ECDH_REPLY during key exchange points to a MTU/packet fragmentation issue, which is extremely common with mobile hotspots.
What's happening
The SSH key exchange uses large packets (especially with post-quantum algorithms like sntrup761x25519-sha512). Mobile networks often have:
- Lower MTU than typical networks (1500 bytes on wifi vs ~1400 on cellular)
- Aggressive packet filtering or mangling
- Issues with large UDP/TCP packets that need fragmentation The connection establishes fine (small packets), but hangs when the first large crypto packet is sent.
Alternative fix
# Find your hotspot interface (probably wlan0 or similar)
ip link show
# Temporarily reduce MTU
sudo ip link set dev <interface> mtu 1400
Permanent SSH config fix
Add to ~/.ssh/config:
Host github.com
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org
This disables the post-quantum sntrup761 algorithm which generates the largest packets.
Top comments (0)