Thursday, May 11, 2023

Windows 11 SSH Client - No Matching Key

 When trying to ssh to a device from Windows 11 I received the following error:


Unable to negotiate with x.x.x.x port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1



Solution

You can specify the key exchange method via command line by using the following command:

ssh -o KexAlgorithms=+diffie-hellman-group14-sha1 x.x.x.x


Alternatively you can create a file named "config" with no file extension under %USERPROFILE%\.ssh and include the line below in the file. 

KexAlgorithms=+diffie-hellman-group14-sha1