no matching key exchange method found issue for Ubuntu ssh

Samuel Yang
1 min readSep 6, 2018

Add the address and the algorithm in the ~/.ssh/config file:

Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1

Wild card may be used for the address.

e.g.

Host *.*.*

$ cat ~/.ssh/config
Host 10.*.*.*
KexAlgorithms +diffie-hellman-group1-sha1
Host 192.*.*.*
KexAlgorithms +diffie-hellman-group1-sha1

--

--