I've started a gerrit server. When I try to ssh to it I get:
Unable to negotiate with 127.0.0.1 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 username@localhost -p 29418
/home/username/.ssh/config: line 6: Bad configuration option: keyalgorithms
Bad key types '+diffie-hellman-group1-sha1'
You put there different option in the configuration, than on the command line. It should be
Host localhost KexAlgorithms +diffie-hellman-group1-sha1
KexAlgorithms are not the
HostKeyAlgorithms. They are completely different options with different values serving for different purposes.