ssh and no matching key exchange method found

PUBLISHED ON JAN 4, 2021 / 0 MIN READ — NOTES, SCRIBBLES

Recently I had to access an old HP ProCurve 2810 switch using SSH, but due to it having been unsupported for years the SSH implementation is lacklustre and thus I needed to tweak my SSH config to accomodate for this. You might see something like this “Unable to negotiate with xx.xx.xx.xx port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

Add something like the below to ~/.ssh/config

Host myhost.internal.tld
        HostkeyAlgorithms ssh-dss,ssh-rsa
        KexAlgorithms +diffie-hellman-group1-sha1

Reference: OpenSSH Legacy Options

TAGS: SECURITY, SSH