Amar P asked this 2 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 2 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 2 years ago
17 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

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

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 1 year ago
1 like

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

Guest 11 months ago
1 like

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 1 year ago
1 like

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 10 months 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


- Good solution any ways. thanks a lot guys .......! | Guest| 7 months ago

- thx alot..it worked | Guest| 1 year ago

- thanks a lot solution worked for me | Guest| 1 year ago

- Above solution worked for me too. Thanks!!! | Guest| 1 year ago

- awesome , thank you | Luka| 1 year ago

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