-2

This is the message that Putty/Kitty yields when connecting via SSH to my old Buffalo WHR-HP-G54N router:

The first key-exchange algorithm supported by the server is [Whatever]`, which is below the configured warning threshold. Do you want to continue with this connection?

I know how to configure my OpenSSH client to allow specific algorithms, but isn't there a simple way to obtain some equivalent (and, I must say, comfortable) behavior?

Edit 01: As long as this question asks about any "low security servers" (so non-specific), and in order to avoid answers focused on specific algorithms, I have edited the message box to show it as [Whatever] .

2 Answers2

3

Depending on the exact situation there are two ways to tackle this. That said: comfort comes at the expense of security, obviously. But with a router like that you have limited options anyway.

The package openssh-client-ssh1 allows to connect to the deprecated SSH v1 protocol. But obviously you have to use ssh1 in place of ssh whenever using the client. A small price to pay, though.

If you are using a shell capable of creating an alias, you could do something like this for your particular issue (which seems to be SSH v2):

alias SSH-insecure='ssh -o KexAlgorithms=+diffie-hellman-group1-sha1'

I had to deal with a bunch of outdated Linux-based devices some time ago and I threw in one two more options, because IPs would change all the time:

 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null

... but YMMV, so use common sense to decide.

Another option, if the IP address and/or name are fixed, would be to create a Host match section in your ~/.ssh/config to imbue the above mentioned options there. Refer to ssh_config(5).

0xC0000022L
  • 16,593
0

There's no functionality in OpenSSH to ask the user interactively like this.

Your best alternative is to write a stanza in ~/.ssh/config matching the hosts you want to use this key-exchange with, and update it each time you find a server that needs to be added.

That would be something like

Host old-machine-1 old-machine-2
KexAlgorithms +diffie-hellman-group1-sha1
IdentityFile ~/.ssh/id_rsa

(I've shown the IdentityFile setting as many older machines don't handle ED25519, for instance)

Toby Speight
  • 8,678