Amar P asked this 7 years ago

PuTTY Fatal Error: expected key exchange group packet from server

Hi I am using Putty to ssh to a Centos virtual machine running on virtual box. It was working without any problemn until now when it start throwing the error

PuTTY Fatal Error: expected key exchange group packet from server

I havent done any change to my VM or on my host recently and I can ping the VM.

Any suggestions?


Best Answer by Katy 6 years ago

I had this same issue and to fix it i change the key exchange algorithm.

In putty settings under connection->ssh->kex I moved Diffie-Hellman group 14 to the top of the list and Diffie-Helman group exchange to the bottom. this solved the issue.

Laura 6 years ago
21 likes

You can enable logging of sshd which can give you more details about the error.

To enable logging, edit etc/ssh/sshd_configfile and add the following line:

LogLevel DEBUG2

Reload sshd config:

systemctl reload sshd

Debug message will be logged to the file /var/log/secure

tail -f /var/log/secure

Guest 5 years ago
4 likes

yes, it worked.

Root cause: Windows system was running on old version Putty using 1024 key. RHEL need new version ssh client because in RHEL 7 key is 2048.

Guest 5 years ago
3 likes

Below option worked for me as well. Thanks a lot


In putty settings under connection->ssh->kex I moved Diffie-Hellman group 14 to the top of the list and Diffie-Helman group exchange to the bottom. this solved the issue.

Guest 5 years ago
2 likes

Below option worked for me as well. Thanks a ton

In putty settings under connection->ssh->kex I moved Diffie-Hellman group 14 to the top of the list and Diffie-Helman group exchange to the bottom. this solved the issue.

Regards,

Brijesh
Guest 5 years ago
1 like

the setting doesn't save where open is not there after you move the Diffie-Hellman group 14 to the top.

rijo 6 years ago
1 like
I also did the same configuration mention above and i am able to connect to my cloud VM.
Guest 5 years ago

i am getting the same problem while doing PSCP  from windows to centos 7.6 does anyone know how to solve the issue ? 

I am using below command.

pscp -i  keyfile sourcefile  user@1.2.3.4:/home/user


- thanks alot it working fine | Guest| 3 years ago

- Good solution any ways. thanks a lot guys .......! | Guest| 4 years ago

- thx alot..it worked | Guest| 5 years ago

- thanks a lot solution worked for me | Guest| 6 years ago

- Above solution worked for me too. Thanks!!! | Guest| 6 years ago

- awesome , thank you | Luka| 6 years ago

- Its fixed for me as well Thanks | Yad| 6 years ago