ssh fails to connect with debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Running ssh across a vpn connection I started having my ssh sessions fail to connect. After starting ssh with the “-vvv” option, the session would timeout after getting a
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
After doing some research, I found other people were having the same problem. Some of them resolved it by adjusting the MTU value in the vpn connection. I did not find a convenient place to adjust that in my vpn client, but I did discover other people resolved it using the following ssh option
ssh -o KexAlgorithms=ecdh-sha2-nistp521 username@systemname
So you do not have to type all that in every time, you can add it either to the /etc/ssh/ssh_config file (which will apply it to all users on the client system ) or to the ~/.ssh/config file (which will only apply it to your user)
find the line
Host *
and under that line add
KexAlgorithms ecdh-sha2-nistp521
and (hopefully) you will be back in business
Note: I suspect the cause of the problem for me was I had been using my Verizon phone for a hot spot. Then I switched to a Netgear 4G Verizon router and that is when the problem started.