Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.

Sign up to join this community

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I faced this issue on a server in another country. I changed mtu to values between 1200 and 1500 but nothing changed. I reinstall openssh but nothing happened. please help. tnx.Also forcing HostKeyAlgorithms to one algorithm did not helped. Also tested ssh from the server and it works fine. I think the problem is related to network parameters but I don't know what parameter should i change.

debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: [email protected] MAC: <implicit                                                                                                                                                             > compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit                                                                                                                                                             > compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY

I've had the exact same problem and have it solved this way:

Option 1 (one-time use): At the comand line when submitting the SSH connect comnand, add "-oKexAlgorithms=ecdh-sha2-nistp521" parameter

Option 2 (definitive): Add "KexAlgorithms=ecdh-sha2-nistp521" (with no quotes) on the corresponding ssh_config file

After adding below settings SSH started working

[root@RHELSERVER .ssh]# cat /root/.ssh/config
KexAlgorithms diffie-hellman-group18-sha512