DEV Community


Using ssh with servers that have a different set of keys

fernand0 profile image Fernando Tricas García ・1 min read

I have to use an old server whose ssh installed configuration has not the more modern key exchange algorithms, so my config does not allow me to connect to it.
When I try to connect to it, I get:

Unable to negotiate with xx.yy.ww.zz port 22: no matching key exchange method found. Their offer: gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

I don't want to allow these algorithms for all my connections so you can allow some less-secure protocols for a machine with a file .ssh/config containing:

Host xx.yy.ww.zz    
     KexAlgorithms +diffie-hellman-group1-sha1

This is more or less a note to self. I'm not sure if this type of posts are interesting here but I had to try to write something :-).

Discussion (0)

Editor guide